From e0cd8822396dba527288103217ad8af8442e3721 Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Mon, 29 Sep 2025 13:49:49 +0000 Subject: [PATCH 1/2] [main@2344e48] Update AL-Go System Files from microsoft/AL-Go-AppSource@preview - 1ad2c5a --- .github/AL-Go-Settings.json | 3 +- .github/RELEASENOTES.copy.md | 87 +++++++++++++ .github/Test Current.settings.json | 1 + .github/Test Next Major.settings.json | 1 + .github/Test Next Minor.settings.json | 1 + .github/workflows/CICD.yaml | 114 ++++++++++++------ .../CreateOnlineDevelopmentEnvironment.yaml | 22 ++-- .github/workflows/CreateRelease.yaml | 50 ++++---- .github/workflows/Current.yaml | 20 +-- .../DeployReferenceDocumentation.yaml | 14 +-- .github/workflows/IncrementVersionNumber.yaml | 16 +-- .github/workflows/NextMajor.yaml | 20 +-- .github/workflows/NextMinor.yaml | 20 +-- .github/workflows/PublishToAppSource.yaml | 18 +-- .github/workflows/PublishToEnvironment.yaml | 34 +++--- .github/workflows/PullRequestHandler.yaml | 63 ++++++++-- .github/workflows/Troubleshooting.yaml | 4 +- .../workflows/UpdateGitHubGoSystemFiles.yaml | 20 +-- .github/workflows/_BuildALGoProject.yaml | 46 ++++--- Library Apps/.AL-Go/cloudDevEnv.ps1 | 25 +++- Library Apps/.AL-Go/localDevEnv.ps1 | 25 +++- Library Apps/.AL-Go/settings.json | 1 + Main App/.AL-Go/cloudDevEnv.ps1 | 25 +++- Main App/.AL-Go/localDevEnv.ps1 | 25 +++- Main App/.AL-Go/settings.json | 1 + 25 files changed, 458 insertions(+), 198 deletions(-) diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json index 3dc1066..854bfe6 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/settings.schema.json", "type": "AppSource App", "templateUrl": "https://github.com/microsoft/AL-Go-AppSource@preview", "NextMajorSchedule": "0 2 * * 0", @@ -26,5 +27,5 @@ "Account": "BCCodeSigningTest", "CertificateProfile": "BCCodeSigningPublic" }, - "templateSha": "1a78239c6dd89870bae4629d7d80406eaf51fc67" + "templateSha": "1ad2c5ac3f976c3f4e69177a738fafffa4cf42d7" } diff --git a/.github/RELEASENOTES.copy.md b/.github/RELEASENOTES.copy.md index b50f8fb..51ca640 100644 --- a/.github/RELEASENOTES.copy.md +++ b/.github/RELEASENOTES.copy.md @@ -1,3 +1,90 @@ +## preview + +Note that when using the preview version of AL-Go for GitHub, we recommend you Update your AL-Go system files, as soon as possible when informed that an update is available. + +### AL Code Analysis tracked in GitHub + +AL-Go already supports AL code analysis, but up until now this was not tracked in GitHub. It is now possible to track code analysis issues automatically in the GitHub security tab, as well as having any new issues posted as a comment in Pull Requests. + +Enable this feature by using the new setting [trackALAlertsInGithub](https://aka.ms/algosettings#trackALAlertsInGithub). This setting must be enabled at the repo level, but can optionally be disabled per project. + +Please note that some automated features are premium and require the use of [GitHub Code Security](https://docs.github.com/en/get-started/learning-about-github/about-github-advanced-security) + +### Issues + +- Discussion 1885 Conditional settings for CI/CD are not applied + +## v7.3 + +### Configurable merge method for pull request auto-merge + +A new setting `pullRequestMergeMethod` has been added to the `commitOptions` structure, allowing you to configure which merge method to use when `pullRequestAutoMerge` is enabled. Valid values are "merge" or "squash". The default value is "squash" to maintain backward compatibility. + +Example + +```json +{ + "commitOptions": { + "pullRequestAutoMerge": true, + "pullRequestMergeMethod": "merge" + } +} +``` + +### AL-Go Telemetry + +AL-Go now offers a dataexplorer dashboard to get started with AL-Go telemetry. Additionally, we've updated the documentation to include a couple of kusto queries if you would rather build your own reports. + +### Support for AL-Go settings as GitHub environment variable: ALGoEnvSettings + +AL-Go settings can now be defined in GitHub environment variables. To use this feature, create a new variable under your GitHub environment called `ALGoEnvironmentSettings`. Please note that this variable should not include your environment name. + +Settings loaded this way, will only be available during the Deploy step of the CI/CD or Publish to Environment actions, but not the Build step, making it most suitable for the [DeployTo setting](https://aka.ms/algosettings#deployto). Settings defined in this variable will take priority over any setting defined in AL-Go repo, org or settings files. + +The contents of the variable should be a JSON block, similar to any other settings file or variable. When defining the `DeployTo\` setting in this variable, it should still include the environment name. Eg: + +``` +{ + DeployToProduction { + "Branches": [ + "*" + ], + "includeTestAppsInSandboxEnvironment": false, + "excludeAppIds": [ 1234 ] + } +} +``` + +Please note, that due to certain security limitations, the properties `runs-on`, `shell` and `ContinousDeployment` of the `DeployTo` setting will **NOT** be respected if defined in a GitHub environment variable. To use these properties, please keep them defined elsewhere, such as your AL-Go settings file or Org/Repo settings variables. + +### Issues + +- Issue 1770 Wrong type of _projects_ setting in settings schema +- Issue 1787 Publish to Environment from PR fails in private repos +- Issue 1722 Check if apps are already installed on a higher version before deploying +- Issue 1774 Increment Version Number with +0.1 can increment some version numbers twice +- Issue 1837 Deployment from PR builds fail if PR branch name includes forward slashes (e.g., `feature/branch-name`). +- Issue 1852 Page Scripting Tests are not added to build summary +- Issue 1829 Added custom jobs cannot be removed +- Idea 1856 Include workflow name as input for action ReadSetting + +### Additional debug logging functionality + +We have improved how logging is handled in AL-Go, and now make better use of GitHub built-in extended debug logging functionality. Extended debug logging can be enabled when re-running actions by clicking the 'Enable debug logging' checkbox in the pop-up window. This can be done both for jobs that failed and jobs that succeeded, but did not produce the correct result. + +### Add custom jobs to AL-Go workflows + +It is now possible to add custom jobs to AL-Go workflows. The Custom Job needs to be named `CustomJob` and should be placed after all other jobs in the .yaml file. The order of which jobs are executed is determined by the Needs statements. Your custom job will be executed after all jobs specified in the Needs clause in your job and if you need the job to be executed before other jobs, you should add the job name in the Needs clause of that job. See [https://aka.ms/algosettings#customjobs](https://aka.ms/algosettings#customjobs) for details. + +Note that custom jobs might break by future changes to AL-Go for GitHub workflows. If you have customizations to AL-Go for GitHub workflows, you should always doublecheck the pull request generated by Update AL-Go System Files. + +### Support for Custom AL-Go template repositories + +Create an AL-Go for GitHub repository based on [https://aka.ms/algopte](https://aka.ms/algopte) or [https://aka.ms/algoappsource](https://aka.ms/algoappsource), add custom workflows, custom jobs and/or settings to this repository and then use that repository as the template repository for other repositories. Using custom template repositories allows you to create and use highly customized template repositories and control the uptake of this in all repositories. See [https://aka.ms/algosettings#customtemplate](https://aka.ms/algosettings#customtemplate) for details. + +> [!NOTE] +> Customized repositories might break by future changes to AL-Go for GitHub. If you are customizing AL-Go for GitHub, you should always double-check the pull request when updating AL-Go system files in your custom template repositories. + ## v7.2 ### Removed functionality diff --git a/.github/Test Current.settings.json b/.github/Test Current.settings.json index afb3d65..2ce0331 100644 --- a/.github/Test Current.settings.json +++ b/.github/Test Current.settings.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/settings.schema.json", "artifact": "////latest", "cacheImageName": "", "versioningStrategy": 15 diff --git a/.github/Test Next Major.settings.json b/.github/Test Next Major.settings.json index a5a125a..7ba6ede 100644 --- a/.github/Test Next Major.settings.json +++ b/.github/Test Next Major.settings.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/settings.schema.json", "artifact": "////nextmajor/{INSIDERSASTOKEN}", "cacheImageName": "", "versioningStrategy": 15 diff --git a/.github/Test Next Minor.settings.json b/.github/Test Next Minor.settings.json index 91469d1..f5afbca 100644 --- a/.github/Test Next Minor.settings.json +++ b/.github/Test Next Minor.settings.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/settings.schema.json", "artifact": "////nextminor/{INSIDERSASTOKEN}", "cacheImageName": "", "versioningStrategy": 15 diff --git a/.github/workflows/CICD.yaml b/.github/workflows/CICD.yaml index 75d10f2..739180d 100644 --- a/.github/workflows/CICD.yaml +++ b/.github/workflows/CICD.yaml @@ -18,6 +18,7 @@ permissions: contents: read id-token: write pages: read + security-events: write env: workflowDepth: 2 @@ -46,34 +47,41 @@ jobs: baselineWorkflowSHA: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowSHA }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} powerPlatformSolutionFolder: ${{ steps.DeterminePowerPlatformSolutionFolder.outputs.powerPlatformSolutionFolder }} + trackALAlertsInGithub: ${{ steps.SetALCodeAnalysisVar.outputs.trackALAlertsInGithub }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - get: type,powerPlatformSolutionFolder,useGitSubmodules + get: type,powerPlatformSolutionFolder,useGitSubmodules,trackALAlertsInGithub + + - name: Set AL Code Analysis Var output + id: SetALCodeAnalysisVar + run: | + Write-Host "trackALAlertsInGithub environment variable: '$($env:trackALAlertsInGithub)'" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "trackALAlertsInGithub=$($env:trackALAlertsInGithub)" - name: Read submodules token id: ReadSubmodulesToken if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -81,7 +89,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true submodules: ${{ env.useGitSubmodules }} @@ -94,7 +102,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.2 + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -107,7 +115,7 @@ jobs: - name: Determine Delivery Target Secrets id: DetermineDeliveryTargetSecrets - uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v7.2 + uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}' @@ -115,7 +123,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -123,7 +131,7 @@ jobs: - name: Determine Delivery Targets id: DetermineDeliveryTargets - uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v7.2 + uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -133,7 +141,7 @@ jobs: - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v7.2 + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -146,24 +154,24 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh get: templateUrl - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: 'ghTokenWorkflow' - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@v7.2 + uses: microsoft/AL-Go/Actions/CheckForUpdates@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -195,6 +203,7 @@ jobs: secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' signArtifacts: true useArtifactCache: true + needsContext: ${{ toJson(needs) }} Build: needs: [ Initialization, Build1 ] @@ -219,10 +228,42 @@ jobs: secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' signArtifacts: true useArtifactCache: true + needsContext: ${{ toJson(needs) }} + + CodeAnalysisUpload: + needs: [ Initialization, Build ] + if: (!cancelled()) && (needs.Initialization.outputs.trackALAlertsInGithub == 'True') + runs-on: [ ubuntu-latest ] + name: Code Analysis Processing + steps: + - name: Checkout + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - name: Download artifacts - ErrorLogs + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + if: (success() || failure()) + with: + pattern: '*-ErrorLogs-*' + path: '${{ github.workspace }}/ErrorLogs/' + merge_multiple: true + + - name: Process AL Code Analysis Logs + id: ProcessALCodeAnalysisLogs + if: (success() || failure()) + uses: microsoft/AL-Go/Actions/ProcessALCodeAnalysisLogs@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 + with: + shell: pwsh + + - name: Upload SARIF file to GitHub + uses: github/codeql-action/upload-sarif@v3 + if: always() + with: + sarif_file: '${{ github.workspace }}/ErrorLogs/output.sarif.json' + category: "ALCodeAnalysis" DeployALDoc: needs: [ Initialization, Build ] - if: (!cancelled()) && needs.Build.result == 'Success' && needs.Initialization.outputs.generateALDocArtifact == 1 && github.ref_name == 'main' + if: (!cancelled()) && (needs.Build.result == 'success' || needs.Build.result == 'skipped') && needs.Initialization.outputs.generateALDocArtifact == 1 && github.ref_name == 'main' runs-on: [ ubuntu-latest ] name: Deploy Reference Documentation permissions: @@ -235,15 +276,15 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Download artifacts - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh @@ -252,13 +293,13 @@ jobs: uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - name: Build Reference Documentation - uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v7.2 + uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh artifacts: '.artifacts' - name: Upload pages artifact - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 with: path: ".aldoc/_site/" @@ -279,17 +320,20 @@ jobs: environment: name: ${{ matrix.environment }} url: ${{ steps.Deploy.outputs.environmentUrl }} + env: + ALGoEnvSettings: ${{ vars.ALGoEnvironmentSettings }} + ALGoEnvName: ${{ matrix.environment }} steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Download artifacts - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ matrix.shell }} get: type,powerPlatformSolutionFolder @@ -303,7 +347,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ matrix.shell }} gitHubSecrets: ${{ toJson(secrets) }} @@ -311,7 +355,7 @@ jobs: - name: Deploy to Business Central id: Deploy - uses: microsoft/AL-Go-Actions/Deploy@v7.2 + uses: microsoft/AL-Go/Actions/Deploy@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -323,7 +367,7 @@ jobs: - name: Deploy to Power Platform if: env.type == 'PTE' && env.powerPlatformSolutionFolder != '' - uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v7.2 + uses: microsoft/AL-Go/Actions/DeployPowerPlatform@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -343,28 +387,28 @@ jobs: name: Deliver to ${{ matrix.deliveryTarget }} steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Download artifacts - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ matrix.deliveryTarget }}Context' - name: Deliver - uses: microsoft/AL-Go-Actions/Deliver@v7.2 + uses: microsoft/AL-Go/Actions/Deliver@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -380,11 +424,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml index bf7dbe6..571ff17 100644 --- a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml +++ b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml @@ -50,28 +50,28 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -90,7 +90,7 @@ jobs: Write-Host "AdminCenterApiCredentials not provided, initiating Device Code flow" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -109,16 +109,16 @@ jobs: deviceCode: ${{ needs.Initialization.outputs.deviceCode }} steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -137,7 +137,7 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -value "adminCenterApiCredentials=$adminCenterApiCredentials" - name: Create Development Environment - uses: microsoft/AL-Go-Actions/CreateDevelopmentEnvironment@v7.2 + uses: microsoft/AL-Go/Actions/CreateDevelopmentEnvironment@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -149,7 +149,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/CreateRelease.yaml b/.github/workflows/CreateRelease.yaml index 676d4d2..e8ea489 100644 --- a/.github/workflows/CreateRelease.yaml +++ b/.github/workflows/CreateRelease.yaml @@ -78,35 +78,35 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh get: templateUrl,repoName,type,powerPlatformSolutionFolder - name: Validate Workflow Input if: ${{ github.event_name == 'workflow_dispatch' }} - uses: microsoft/AL-Go-Actions/ValidateWorkflowInput@v7.2 + uses: microsoft/AL-Go/Actions/ValidateWorkflowInput@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -115,12 +115,14 @@ jobs: - name: Determine Projects id: determineProjects - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.2 + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@v7.2 + uses: microsoft/AL-Go/Actions/CheckForUpdates@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 + env: + GITHUB_TOKEN: ${{ github.token }} with: shell: pwsh templateUrl: ${{ env.templateUrl }} @@ -128,7 +130,7 @@ jobs: downloadLatest: true - name: Determine artifacts for release - uses: microsoft/AL-Go-Actions/DetermineArtifactsForRelease@v7.2 + uses: microsoft/AL-Go/Actions/DetermineArtifactsForRelease@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 id: determineArtifactsForRelease with: shell: pwsh @@ -139,7 +141,7 @@ jobs: - name: Prepare release notes id: createreleasenotes - uses: microsoft/AL-Go-Actions/CreateReleaseNotes@v7.2 + uses: microsoft/AL-Go/Actions/CreateReleaseNotes@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh buildVersion: ${{ github.event.inputs.buildVersion }} @@ -147,7 +149,7 @@ jobs: target_commitish: ${{ steps.determineArtifactsForRelease.outputs.commitish }} - name: Create release - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 id: createrelease env: bodyMD: ${{ steps.createreleasenotes.outputs.releaseNotes }} @@ -185,16 +187,16 @@ jobs: fail-fast: true steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -217,7 +219,7 @@ jobs: Invoke-WebRequest -UseBasicParsing -Headers $headers -Uri $ENV:MATRIX_URL -OutFile "$($ENV:MATRIX_NAME).zip" - name: Upload release artifacts - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 env: releaseId: ${{ needs.createrelease.outputs.releaseId }} MATRIX_NAME: ${{ matrix.name }} @@ -238,7 +240,7 @@ jobs: }); - name: Deliver to NuGet - uses: microsoft/AL-Go-Actions/Deliver@v7.2 + uses: microsoft/AL-Go/Actions/Deliver@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).nuGetContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -251,7 +253,7 @@ jobs: atypes: 'Apps,TestApps' - name: Deliver to Storage - uses: microsoft/AL-Go-Actions/Deliver@v7.2 + uses: microsoft/AL-Go/Actions/Deliver@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).storageContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -269,7 +271,7 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: '${{ needs.createRelease.outputs.commitish }}' @@ -292,16 +294,16 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -309,7 +311,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Update Version Number - uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v7.2 + uses: microsoft/AL-Go/Actions/IncrementVersionNumber@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -323,11 +325,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/Current.yaml b/.github/workflows/Current.yaml index b227bf9..f9dd8fa 100644 --- a/.github/workflows/Current.yaml +++ b/.github/workflows/Current.yaml @@ -32,24 +32,24 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh get: useGitSubmodules,shortLivedArtifactsRetentionDays @@ -57,7 +57,7 @@ jobs: - name: Read submodules token id: ReadSubmodulesToken if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -65,7 +65,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true submodules: ${{ env.useGitSubmodules }} @@ -79,7 +79,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.2 + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -104,6 +104,7 @@ jobs: secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'Current' + needsContext: ${{ toJson(needs) }} Build: needs: [ Initialization, Build1 ] @@ -125,6 +126,7 @@ jobs: secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'Current' + needsContext: ${{ toJson(needs) }} PostProcess: needs: [ Initialization, Build1, Build ] @@ -132,11 +134,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/DeployReferenceDocumentation.yaml b/.github/workflows/DeployReferenceDocumentation.yaml index beb0db1..3299c96 100644 --- a/.github/workflows/DeployReferenceDocumentation.yaml +++ b/.github/workflows/DeployReferenceDocumentation.yaml @@ -26,22 +26,22 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v7.2 + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -54,13 +54,13 @@ jobs: uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - name: Build Reference Documentation - uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v7.2 + uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh artifacts: 'latest' - name: Upload pages artifact - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 with: path: ".aldoc/_site/" @@ -71,7 +71,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/IncrementVersionNumber.yaml b/.github/workflows/IncrementVersionNumber.yaml index eb3dccd..82e917e 100644 --- a/.github/workflows/IncrementVersionNumber.yaml +++ b/.github/workflows/IncrementVersionNumber.yaml @@ -48,33 +48,33 @@ jobs: pull-requests: write steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Validate Workflow Input if: ${{ github.event_name == 'workflow_dispatch' }} - uses: microsoft/AL-Go-Actions/ValidateWorkflowInput@v7.2 + uses: microsoft/AL-Go/Actions/ValidateWorkflowInput@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -82,7 +82,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Increment Version Number - uses: microsoft/AL-Go-Actions/IncrementVersionNumber@v7.2 + uses: microsoft/AL-Go/Actions/IncrementVersionNumber@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -93,7 +93,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/NextMajor.yaml b/.github/workflows/NextMajor.yaml index 3a10a02..3079bb2 100644 --- a/.github/workflows/NextMajor.yaml +++ b/.github/workflows/NextMajor.yaml @@ -32,24 +32,24 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh get: useGitSubmodules,shortLivedArtifactsRetentionDays @@ -57,7 +57,7 @@ jobs: - name: Read submodules token id: ReadSubmodulesToken if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -65,7 +65,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true submodules: ${{ env.useGitSubmodules }} @@ -79,7 +79,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.2 + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -104,6 +104,7 @@ jobs: secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'NextMajor' + needsContext: ${{ toJson(needs) }} Build: needs: [ Initialization, Build1 ] @@ -125,6 +126,7 @@ jobs: secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'NextMajor' + needsContext: ${{ toJson(needs) }} PostProcess: needs: [ Initialization, Build1, Build ] @@ -132,11 +134,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/NextMinor.yaml b/.github/workflows/NextMinor.yaml index 3b72293..04cd6cd 100644 --- a/.github/workflows/NextMinor.yaml +++ b/.github/workflows/NextMinor.yaml @@ -32,24 +32,24 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh get: useGitSubmodules,shortLivedArtifactsRetentionDays @@ -57,7 +57,7 @@ jobs: - name: Read submodules token id: ReadSubmodulesToken if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -65,7 +65,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true submodules: ${{ env.useGitSubmodules }} @@ -79,7 +79,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.2 + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -104,6 +104,7 @@ jobs: secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'NextMinor' + needsContext: ${{ toJson(needs) }} Build: needs: [ Initialization, Build1 ] @@ -125,6 +126,7 @@ jobs: secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'NextMinor' + needsContext: ${{ toJson(needs) }} PostProcess: needs: [ Initialization, Build1, Build ] @@ -132,11 +134,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PublishToAppSource.yaml b/.github/workflows/PublishToAppSource.yaml index c46c457..7de5748 100644 --- a/.github/workflows/PublishToAppSource.yaml +++ b/.github/workflows/PublishToAppSource.yaml @@ -38,16 +38,16 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh @@ -57,23 +57,23 @@ jobs: name: Deliver to AppSource steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: 'appSourceContext' - name: Deliver - uses: microsoft/AL-Go-Actions/Deliver@v7.2 + uses: microsoft/AL-Go/Actions/Deliver@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -90,11 +90,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PublishToEnvironment.yaml b/.github/workflows/PublishToEnvironment.yaml index 32f89c4..9f07364 100644 --- a/.github/workflows/PublishToEnvironment.yaml +++ b/.github/workflows/PublishToEnvironment.yaml @@ -15,6 +15,8 @@ permissions: actions: read contents: read id-token: write + pull-requests: read + checks: read defaults: run: @@ -36,28 +38,28 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v7.2 + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -75,7 +77,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 if: steps.DetermineDeploymentEnvironments.outputs.UnknownEnvironment == 1 with: shell: pwsh @@ -107,7 +109,7 @@ jobs: Write-Host "No AuthContext provided for $envName, initiating Device Code flow" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -129,9 +131,11 @@ jobs: url: ${{ steps.Deploy.outputs.environmentUrl }} env: deviceCode: ${{ needs.Initialization.outputs.deviceCode }} + ALGoEnvSettings: ${{ vars.ALGoEnvironmentSettings }} + ALGoEnvName: ${{ matrix.environment }} steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: EnvName id: envName @@ -141,21 +145,21 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "envName=$envName" - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ matrix.shell }} get: type,powerPlatformSolutionFolder - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ matrix.shell }} gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext' - name: Get Artifacts for deployment - uses: microsoft/AL-Go-Actions/GetArtifactsForDeployment@v7.2 + uses: microsoft/AL-Go/Actions/GetArtifactsForDeployment@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ matrix.shell }} artifactsVersion: ${{ github.event.inputs.appVersion }} @@ -163,7 +167,7 @@ jobs: - name: Deploy to Business Central id: Deploy - uses: microsoft/AL-Go-Actions/Deploy@v7.2 + uses: microsoft/AL-Go/Actions/Deploy@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -176,7 +180,7 @@ jobs: - name: Deploy to Power Platform if: env.type == 'PTE' && env.powerPlatformSolutionFolder != '' - uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v7.2 + uses: microsoft/AL-Go/Actions/DeployPowerPlatform@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -191,11 +195,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PullRequestHandler.yaml b/.github/workflows/PullRequestHandler.yaml index c4a1ebb..f32a00f 100644 --- a/.github/workflows/PullRequestHandler.yaml +++ b/.github/workflows/PullRequestHandler.yaml @@ -17,6 +17,7 @@ permissions: contents: read id-token: write pull-requests: read + security-events: write env: workflowDepth: 2 @@ -28,7 +29,7 @@ jobs: if: (github.event.pull_request.base.repo.full_name != github.event.pull_request.head.repo.full_name) && (github.event_name != 'pull_request') runs-on: windows-latest steps: - - uses: microsoft/AL-Go-Actions/VerifyPRChanges@v7.2 + - uses: microsoft/AL-Go/Actions/VerifyPRChanges@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 Initialization: needs: [ PregateCheck ] @@ -43,30 +44,37 @@ jobs: workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} artifactsRetentionDays: ${{ steps.DetermineWorkflowDepth.outputs.ArtifactsRetentionDays }} telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} + trackALAlertsInGithub: ${{ steps.SetALCodeAnalysisVar.outputs.trackALAlertsInGithub }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true ref: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - get: shortLivedArtifactsRetentionDays + get: shortLivedArtifactsRetentionDays,trackALAlertsInGithub + + - name: Set AL Code Analysis Var output + id: SetALCodeAnalysisVar + run: | + Write-Host "trackALAlertsInGithub environment variable: '$($env:trackALAlertsInGithub)'" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "trackALAlertsInGithub=$($env:trackALAlertsInGithub)" - name: Determine Workflow Depth id: DetermineWorkflowDepth @@ -76,7 +84,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v7.2 + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -104,6 +112,7 @@ jobs: secrets: 'licenseFileUrl,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'PR${{ github.event.number }}' + needsContext: ${{ toJson(needs) }} useArtifactCache: true Build: @@ -129,8 +138,44 @@ jobs: secrets: 'licenseFileUrl,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} artifactsNameSuffix: 'PR${{ github.event.number }}' + needsContext: ${{ toJson(needs) }} useArtifactCache: true + CodeAnalysisUpload: + needs: [ Initialization, Build ] + if: (!cancelled()) && (needs.Initialization.outputs.trackALAlertsInGithub == 'True') + runs-on: [ ubuntu-latest ] + name: Code Analysis Processing + steps: + - name: Checkout + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + ref: ${{ format('refs/pull/{0}/head', github.event.pull_request.number) }} + + - name: Download artifacts - ErrorLogs + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + if: (success() || failure()) + with: + pattern: '*-ErrorLogs-*' + path: '${{ github.workspace }}/ErrorLogs/' + merge_multiple: true + + - name: Process AL Code Analysis Logs + id: ProcessALCodeAnalysisLogs + if: (success() || failure()) + uses: microsoft/AL-Go/Actions/ProcessALCodeAnalysisLogs@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 + with: + shell: pwsh + + - name: Upload SARIF file to GitHub + uses: github/codeql-action/upload-sarif@v3 + if: always() + with: + sarif_file: '${{ github.workspace }}/ErrorLogs/output.sarif.json' + category: "ALCodeAnalysis" + ref: ${{ format('refs/pull/{0}/head', github.event.pull_request.number) }} + sha: ${{ github.event.pull_request.head.sha }} + StatusCheck: needs: [ Initialization, Build ] if: (!cancelled()) @@ -139,7 +184,7 @@ jobs: steps: - name: Pull Request Status Check id: PullRequestStatusCheck - uses: microsoft/AL-Go-Actions/PullRequestStatusCheck@v7.2 + uses: microsoft/AL-Go/Actions/PullRequestStatusCheck@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -147,7 +192,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 if: success() || failure() env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/Troubleshooting.yaml b/.github/workflows/Troubleshooting.yaml index 79e129a..c7c3a7a 100644 --- a/.github/workflows/Troubleshooting.yaml +++ b/.github/workflows/Troubleshooting.yaml @@ -25,12 +25,12 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: lfs: true - name: Troubleshooting - uses: microsoft/AL-Go-Actions/Troubleshooting@v7.2 + uses: microsoft/AL-Go/Actions/Troubleshooting@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} diff --git a/.github/workflows/UpdateGitHubGoSystemFiles.yaml b/.github/workflows/UpdateGitHubGoSystemFiles.yaml index 5c5497f..33c081a 100644 --- a/.github/workflows/UpdateGitHubGoSystemFiles.yaml +++ b/.github/workflows/UpdateGitHubGoSystemFiles.yaml @@ -42,18 +42,18 @@ jobs: TemplateUrl: ${{ steps.DetermineTemplateUrl.outputs.TemplateUrl }} steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Read settings id: ReadSettings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh get: templateUrl - name: Get Workflow Multi-Run Branches id: GetBranches - uses: microsoft/AL-Go-Actions/GetWorkflowMultiRunBranches@v7.2 + uses: microsoft/AL-Go/Actions/GetWorkflowMultiRunBranches@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh includeBranches: ${{ github.event.inputs.includeBranches }} @@ -82,30 +82,30 @@ jobs: steps: - name: Dump Workflow Information - uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2 + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: ${{ matrix.branch }} - name: Initialize the workflow id: init - uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowInitialize@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh get: commitOptions - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -132,7 +132,7 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "downloadLatest=$downloadLatest" - name: Update AL-Go system files - uses: microsoft/AL-Go-Actions/CheckForUpdates@v7.2 + uses: microsoft/AL-Go/Actions/CheckForUpdates@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: @@ -146,7 +146,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2 + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/_BuildALGoProject.yaml b/.github/workflows/_BuildALGoProject.yaml index 12d53ee..f7f3179 100644 --- a/.github/workflows/_BuildALGoProject.yaml +++ b/.github/workflows/_BuildALGoProject.yaml @@ -73,6 +73,10 @@ on: description: Flag determining whether to use the Artifacts Cache type: boolean default: false + needsContext: + description: JSON formatted needs context + type: string + default: '{}' permissions: actions: read @@ -93,22 +97,22 @@ jobs: name: ${{ inputs.projectName }} (${{ inputs.buildMode }}) steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: ${{ inputs.checkoutRef }} lfs: true - name: Read settings - uses: microsoft/AL-Go-Actions/ReadSettings@v7.2 + uses: microsoft/AL-Go/Actions/ReadSettings@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} buildMode: ${{ inputs.buildMode }} - get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,doNotRunTests,doNotRunBcptTests,doNotRunpageScriptingTests,artifact,generateDependencyArtifact,trustedSigning,useGitSubmodules + get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,doNotRunTests,doNotRunBcptTests,doNotRunpageScriptingTests,artifact,generateDependencyArtifact,trustedSigning,useGitSubmodules,trackALAlertsInGithub - name: Determine whether to build project id: DetermineBuildProject - uses: microsoft/AL-Go-Actions/DetermineBuildProject@v7.2 + uses: microsoft/AL-Go/Actions/DetermineBuildProject@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ inputs.shell }} skippedProjectsJson: ${{ inputs.skippedProjectsJson }} @@ -118,7 +122,7 @@ jobs: - name: Read secrets id: ReadSecrets if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && github.event_name != 'pull_request' - uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2 + uses: microsoft/AL-Go/Actions/ReadSecrets@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ inputs.shell }} gitHubSecrets: ${{ toJson(secrets) }} @@ -126,7 +130,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: ${{ inputs.checkoutRef }} lfs: true @@ -136,14 +140,14 @@ jobs: - name: Determine ArtifactUrl id: determineArtifactUrl if: steps.DetermineBuildProject.outputs.BuildIt == 'True' - uses: microsoft/AL-Go-Actions/DetermineArtifactUrl@v7.2 + uses: microsoft/AL-Go/Actions/DetermineArtifactUrl@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} - name: Cache Business Central Artifacts if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && env.useCompilerFolder == 'True' && inputs.useArtifactCache && env.artifactCacheKey - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 + uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 with: path: ${{ runner.temp }}/.artifactcache key: ${{ env.artifactCacheKey }} @@ -151,7 +155,7 @@ jobs: - name: Download Project Dependencies id: DownloadProjectDependencies if: steps.DetermineBuildProject.outputs.BuildIt == 'True' - uses: microsoft/AL-Go-Actions/DownloadProjectDependencies@v7.2 + uses: microsoft/AL-Go/Actions/DownloadProjectDependencies@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -162,11 +166,12 @@ jobs: baselineWorkflowRunId: ${{ inputs.baselineWorkflowRunId }} - name: Build - uses: microsoft/AL-Go-Actions/RunPipeline@v7.2 + uses: microsoft/AL-Go/Actions/RunPipeline@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 if: steps.DetermineBuildProject.outputs.BuildIt == 'True' env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' BuildMode: ${{ inputs.buildMode }} + NeedsContext: ${{ inputs.needsContext }} with: shell: ${{ inputs.shell }} artifact: ${{ env.artifact }} @@ -180,7 +185,7 @@ jobs: - name: Sign id: sign if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && inputs.signArtifacts && env.doNotSignApps == 'False' && (env.keyVaultCodesignCertificateName != '' || (fromJson(env.trustedSigning).Endpoint != '' && fromJson(env.trustedSigning).Account != '' && fromJson(env.trustedSigning).CertificateProfile != '')) - uses: microsoft/AL-Go-Actions/Sign@v7.2 + uses: microsoft/AL-Go/Actions/Sign@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ inputs.shell }} azureCredentialsJson: '${{ fromJson(steps.ReadSecrets.outputs.Secrets).AZURE_CREDENTIALS }}' @@ -188,7 +193,7 @@ jobs: - name: Calculate Artifact names id: calculateArtifactsNames - uses: microsoft/AL-Go-Actions/CalculateArtifactNames@v7.2 + uses: microsoft/AL-Go/Actions/CalculateArtifactNames@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 if: success() || failure() with: shell: ${{ inputs.shell }} @@ -271,10 +276,19 @@ jobs: path: '${{ inputs.project }}/.buildartifacts/PageScriptingTestResultDetails/' if-no-files-found: ignore + - name: Publish artifacts - ErrorLogs + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + if: inputs.artifactsRetentionDays >= 0 && (hashFiles(format('{0}/.buildartifacts/ErrorLogs/*',inputs.project)) != '') && env.trackALAlertsInGithub == 'True' + with: + name: ${{ steps.calculateArtifactsNames.outputs.ErrorLogsArtifactsName }} + path: '${{ inputs.project }}/.buildartifacts/ErrorLogs/' + if-no-files-found: ignore + retention-days: ${{ inputs.artifactsRetentionDays }} + - name: Analyze Test Results id: analyzeTestResults if: (success() || failure()) && env.doNotRunTests == 'False' - uses: microsoft/AL-Go-Actions/AnalyzeTests@v7.2 + uses: microsoft/AL-Go/Actions/AnalyzeTests@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} @@ -283,7 +297,7 @@ jobs: - name: Analyze BCPT Test Results id: analyzeTestResultsBCPT if: (success() || failure()) && env.doNotRunBcptTests == 'False' - uses: microsoft/AL-Go-Actions/AnalyzeTests@v7.2 + uses: microsoft/AL-Go/Actions/AnalyzeTests@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} @@ -292,7 +306,7 @@ jobs: - name: Analyze Page Scripting Test Results id: analyzeTestResultsPageScripting if: (success() || failure()) && env.doNotRunpageScriptingTests == 'False' - uses: microsoft/AL-Go-Actions/AnalyzeTests@v7.2 + uses: microsoft/AL-Go/Actions/AnalyzeTests@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} @@ -300,7 +314,7 @@ jobs: - name: Cleanup if: always() && steps.DetermineBuildProject.outputs.BuildIt == 'True' - uses: microsoft/AL-Go-Actions/PipelineCleanup@v7.2 + uses: microsoft/AL-Go/Actions/PipelineCleanup@32e66d69cfd2c1e3eca39e416e27c6aa58de6df3 with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} diff --git a/Library Apps/.AL-Go/cloudDevEnv.ps1 b/Library Apps/.AL-Go/cloudDevEnv.ps1 index 29818ec..1e97721 100644 --- a/Library Apps/.AL-Go/cloudDevEnv.ps1 +++ b/Library Apps/.AL-Go/cloudDevEnv.ps1 @@ -15,14 +15,23 @@ $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-S function DownloadHelperFile { param( [string] $url, - [string] $folder + [string] $folder, + [switch] $notifyAuthenticatedAttempt ) $prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue' $name = [System.IO.Path]::GetFileName($url) Write-Host "Downloading $name from $url" $path = Join-Path $folder $name - Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + try { + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + } + catch { + if ($notifyAuthenticatedAttempt) { + Write-Host -ForegroundColor Red "Failed to download $name, trying authenticated download" + } + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path -Headers @{ "Authorization" = "token $(gh auth token)" } + } $ProgressPreference = $prevProgressPreference return $path } @@ -42,12 +51,16 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Github-Helper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json' -folder $tmpFolder | Out-Null -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Packages.json' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt +$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder +$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath +Import-Module $ReadSettingsModule +Import-Module $debugLoggingModule . $ALGoHelperPath -local $baseFolder = GetBaseFolder -folder $PSScriptRoot diff --git a/Library Apps/.AL-Go/localDevEnv.ps1 b/Library Apps/.AL-Go/localDevEnv.ps1 index 8103f6d..925b12b 100644 --- a/Library Apps/.AL-Go/localDevEnv.ps1 +++ b/Library Apps/.AL-Go/localDevEnv.ps1 @@ -19,14 +19,23 @@ $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-S function DownloadHelperFile { param( [string] $url, - [string] $folder + [string] $folder, + [switch] $notifyAuthenticatedAttempt ) $prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue' $name = [System.IO.Path]::GetFileName($url) Write-Host "Downloading $name from $url" $path = Join-Path $folder $name - Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + try { + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + } + catch { + if ($notifyAuthenticatedAttempt) { + Write-Host -ForegroundColor Red "Failed to download $name, trying authenticated download" + } + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path -Headers @{ "Authorization" = "token $(gh auth token)" } + } $ProgressPreference = $prevProgressPreference return $path } @@ -46,12 +55,16 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Github-Helper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json' -folder $tmpFolder | Out-Null -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Packages.json' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt +$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder +$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath +Import-Module $ReadSettingsModule +Import-Module $debugLoggingModule . $ALGoHelperPath -local $baseFolder = GetBaseFolder -folder $PSScriptRoot diff --git a/Library Apps/.AL-Go/settings.json b/Library Apps/.AL-Go/settings.json index 7cca882..1a105c9 100644 --- a/Library Apps/.AL-Go/settings.json +++ b/Library Apps/.AL-Go/settings.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/settings.schema.json", "country": "us", "VersioningStrategy": 16, "CodeSignCertificateUrlSecretName": "CodeSignCertificateUrl", diff --git a/Main App/.AL-Go/cloudDevEnv.ps1 b/Main App/.AL-Go/cloudDevEnv.ps1 index 29818ec..1e97721 100644 --- a/Main App/.AL-Go/cloudDevEnv.ps1 +++ b/Main App/.AL-Go/cloudDevEnv.ps1 @@ -15,14 +15,23 @@ $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-S function DownloadHelperFile { param( [string] $url, - [string] $folder + [string] $folder, + [switch] $notifyAuthenticatedAttempt ) $prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue' $name = [System.IO.Path]::GetFileName($url) Write-Host "Downloading $name from $url" $path = Join-Path $folder $name - Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + try { + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + } + catch { + if ($notifyAuthenticatedAttempt) { + Write-Host -ForegroundColor Red "Failed to download $name, trying authenticated download" + } + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path -Headers @{ "Authorization" = "token $(gh auth token)" } + } $ProgressPreference = $prevProgressPreference return $path } @@ -42,12 +51,16 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Github-Helper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json' -folder $tmpFolder | Out-Null -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Packages.json' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt +$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder +$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath +Import-Module $ReadSettingsModule +Import-Module $debugLoggingModule . $ALGoHelperPath -local $baseFolder = GetBaseFolder -folder $PSScriptRoot diff --git a/Main App/.AL-Go/localDevEnv.ps1 b/Main App/.AL-Go/localDevEnv.ps1 index 8103f6d..925b12b 100644 --- a/Main App/.AL-Go/localDevEnv.ps1 +++ b/Main App/.AL-Go/localDevEnv.ps1 @@ -19,14 +19,23 @@ $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-S function DownloadHelperFile { param( [string] $url, - [string] $folder + [string] $folder, + [switch] $notifyAuthenticatedAttempt ) $prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue' $name = [System.IO.Path]::GetFileName($url) Write-Host "Downloading $name from $url" $path = Join-Path $folder $name - Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + try { + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path + } + catch { + if ($notifyAuthenticatedAttempt) { + Write-Host -ForegroundColor Red "Failed to download $name, trying authenticated download" + } + Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path -Headers @{ "Authorization" = "token $(gh auth token)" } + } $ProgressPreference = $prevProgressPreference return $path } @@ -46,12 +55,16 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Github-Helper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json' -folder $tmpFolder | Out-Null -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Packages.json' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt +$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder +$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath +Import-Module $ReadSettingsModule +Import-Module $debugLoggingModule . $ALGoHelperPath -local $baseFolder = GetBaseFolder -folder $PSScriptRoot diff --git a/Main App/.AL-Go/settings.json b/Main App/.AL-Go/settings.json index bb14194..173f6fc 100644 --- a/Main App/.AL-Go/settings.json +++ b/Main App/.AL-Go/settings.json @@ -1,4 +1,5 @@ { + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/32e66d69cfd2c1e3eca39e416e27c6aa58de6df3/Actions/.Modules/settings.schema.json", "country": "us", "VersioningStrategy": 16, "CodeSignCertificateUrlSecretName": "CodeSignCertificateUrl", From 2bb13f06d937a50c7f6467fa132d190e47ecd5e1 Mon Sep 17 00:00:00 2001 From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com> Date: Mon, 29 Sep 2025 15:51:15 +0200 Subject: [PATCH 2/2] Enable tracking of AL alerts in GitHub --- .github/AL-Go-Settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json index 854bfe6..993c9ab 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -27,5 +27,6 @@ "Account": "BCCodeSigningTest", "CertificateProfile": "BCCodeSigningPublic" }, + "trackALAlertsInGitHub": true, "templateSha": "1ad2c5ac3f976c3f4e69177a738fafffa4cf42d7" }