Test Current #272
This file contains 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 2 * * 1,2,3,4,5' | |
permissions: | |
actions: read | |
contents: read | |
id-token: write | |
defaults: | |
run: | |
shell: pwsh | |
env: | |
workflowDepth: 2 | |
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} | |
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }} | |
jobs: | |
Initialization: | |
needs: [ ] | |
runs-on: [ ubuntu-latest ] | |
outputs: | |
githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} | |
githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} | |
projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} | |
projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} | |
buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} | |
workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} | |
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} | |
steps: | |
- name: Dump Workflow Information | |
uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@75ef430ead72a4c0c4753fb328ecf0257c20c510 | |
with: | |
shell: pwsh | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
lfs: true | |
- name: Initialize the workflow | |
id: init | |
uses: microsoft/AL-Go/Actions/WorkflowInitialize@75ef430ead72a4c0c4753fb328ecf0257c20c510 | |
with: | |
shell: pwsh | |
- name: Read settings | |
id: ReadSettings | |
uses: microsoft/AL-Go/Actions/ReadSettings@75ef430ead72a4c0c4753fb328ecf0257c20c510 | |
with: | |
shell: pwsh | |
- name: Determine Workflow Depth | |
id: DetermineWorkflowDepth | |
run: | | |
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)" | |
- name: Determine Projects To Build | |
id: determineProjectsToBuild | |
uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@75ef430ead72a4c0c4753fb328ecf0257c20c510 | |
with: | |
shell: pwsh | |
maxBuildDepth: ${{ env.workflowDepth }} | |
Build1: | |
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: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
runsOn: ${{ needs.Initialization.outputs.githubRunner }} | |
project: ${{ matrix.project }} | |
projectName: ${{ matrix.projectName }} | |
buildMode: ${{ matrix.buildMode }} | |
projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} | |
secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' | |
publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} | |
artifactsNameSuffix: 'Current' | |
Build: | |
needs: [ Initialization, Build1 ] | |
if: (!failure()) && (!cancelled()) && (needs.Build1.result == 'success' || needs.Build1.result == 'skipped') && fromJson(needs.Initialization.outputs.buildOrderJson)[1].projectsCount > 0 | |
strategy: | |
matrix: | |
include: ${{ fromJson(needs.Initialization.outputs.buildOrderJson)[1].buildDimensions }} | |
fail-fast: false | |
name: Build ${{ matrix.projectName }} (${{ matrix.buildMode }}) | |
uses: ./.github/workflows/_BuildALGoProject.yaml | |
secrets: inherit | |
with: | |
shell: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
runsOn: ${{ needs.Initialization.outputs.githubRunner }} | |
project: ${{ matrix.project }} | |
projectName: ${{ matrix.projectName }} | |
buildMode: ${{ matrix.buildMode }} | |
projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} | |
secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString' | |
publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }} | |
artifactsNameSuffix: 'Current' | |
PostProcess: | |
needs: [ Initialization, Build1, Build ] | |
if: always() | |
runs-on: [ ubuntu-latest ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Finalize the workflow | |
id: PostProcess | |
uses: microsoft/AL-Go/Actions/WorkflowPostProcess@75ef430ead72a4c0c4753fb328ecf0257c20c510 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
shell: pwsh | |
telemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | |
currentJobContext: ${{ toJson(job) }} |