Test Current #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ' Test Current' | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 1 * *' | |
| permissions: | |
| actions: read | |
| contents: read | |
| id-token: write | |
| defaults: | |
| run: | |
| shell: powershell | |
| env: | |
| workflowDepth: 1 | |
| ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} | |
| ALGoRepoSettings: ${{ vars.ALGoRepoSettings }} | |
| jobs: | |
| Initialization: | |
| needs: [ ] | |
| runs-on: [ windows-latest ] | |
| outputs: | |
| projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} | |
| projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} | |
| buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} | |
| workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} | |
| artifactsRetentionDays: ${{ steps.DetermineWorkflowDepth.outputs.ArtifactsRetentionDays }} | |
| telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} | |
| steps: | |
| - name: Dump Workflow Information | |
| uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@ab2f5319ed073c542e03914f8ae6c0fda029ee1e | |
| with: | |
| shell: powershell | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| lfs: true | |
| - name: Initialize the workflow | |
| id: init | |
| uses: microsoft/AL-Go/Actions/WorkflowInitialize@ab2f5319ed073c542e03914f8ae6c0fda029ee1e | |
| with: | |
| shell: powershell | |
| - name: Read settings | |
| id: ReadSettings | |
| uses: microsoft/AL-Go/Actions/ReadSettings@ab2f5319ed073c542e03914f8ae6c0fda029ee1e | |
| with: | |
| shell: powershell | |
| get: useGitSubmodules,shortLivedArtifactsRetentionDays | |
| - name: Read submodules token | |
| id: ReadSubmodulesToken | |
| if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' | |
| uses: microsoft/AL-Go/Actions/ReadSecrets@ab2f5319ed073c542e03914f8ae6c0fda029ee1e | |
| with: | |
| shell: powershell | |
| gitHubSecrets: ${{ toJson(secrets) }} | |
| getSecrets: '-gitSubmodulesToken' | |
| - name: Checkout Submodules | |
| if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| lfs: true | |
| submodules: ${{ env.useGitSubmodules }} | |
| token: '${{ fromJson(steps.ReadSubmodulesToken.outputs.Secrets).gitSubmodulesToken }}' | |
| - name: Determine Workflow Depth | |
| id: DetermineWorkflowDepth | |
| run: | | |
| Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" | |
| Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ArtifactsRetentionDays=$($env:shortLivedArtifactsRetentionDays)" | |
| - name: Determine Projects To Build | |
| id: determineProjectsToBuild | |
| uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@ab2f5319ed073c542e03914f8ae6c0fda029ee1e | |
| with: | |
| shell: powershell | |
| maxBuildDepth: ${{ env.workflowDepth }} | |
| Build: | |
| needs: [ Initialization ] | |
| if: (!failure()) && (!cancelled()) && fromJson(needs.Initialization.outputs.buildOrderJson)[0].projectsCount > 0 | |
| strategy: | |
| matrix: | |
| include: ${{ fromJson(needs.Initialization.outputs.buildOrderJson)[0].buildDimensions }} | |
| fail-fast: false | |
| name: Build ${{ matrix.projectName }} (${{ matrix.buildMode }}) | |
| uses: ./.github/workflows/_BuildALGoProject.yaml | |
| secrets: inherit | |
| with: | |
| shell: ${{ matrix.githubRunnerShell }} | |
| runsOn: ${{ matrix.githubRunner }} | |
| project: ${{ matrix.project }} | |
| projectName: ${{ matrix.projectName }} | |
| buildMode: ${{ matrix.buildMode }} | |
| projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} | |
| secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' | |
| artifactsRetentionDays: ${{ fromJson(needs.Initialization.outputs.artifactsRetentionDays) }} | |
| artifactsNameSuffix: 'Current' | |
| needsContext: ${{ toJson(needs) }} | |
| PostProcess: | |
| needs: [ Initialization, Build ] | |
| if: always() | |
| runs-on: [ windows-latest ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Finalize the workflow | |
| id: PostProcess | |
| uses: microsoft/AL-Go/Actions/WorkflowPostProcess@ab2f5319ed073c542e03914f8ae6c0fda029ee1e | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| shell: powershell | |
| telemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | |
| currentJobContext: ${{ toJson(job) }} |