Skip to content

Update Al-go system files #19

Update Al-go system files

Update Al-go system files #19

name: 'Pull Request Build'
on:
pull_request_target:
branches: [ 'main' ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
defaults:
run:
shell: powershell
permissions:
contents: read
actions: read
pull-requests: read
env:
workflowDepth: 1
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }}
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }}
jobs:
PregateCheck:
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@6a9ef0c91e5b54d0fd3abb3d4495417a1db28f17
Initialization:
needs: [ PregateCheck ]
if: (!failure() && !cancelled())
runs-on: [ windows-latest ]
outputs:
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}
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 }}
baselineWorkflowRunId: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowRunId }}
workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }}
steps:
- name: Dump Workflow Information
uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@6a9ef0c91e5b54d0fd3abb3d4495417a1db28f17
with:
shell: powershell
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
ref: refs/pull/${{ github.event.number }}/merge
- name: Initialize the workflow
id: init
uses: microsoft/AL-Go/Actions/WorkflowInitialize@6a9ef0c91e5b54d0fd3abb3d4495417a1db28f17
with:
shell: powershell
eventId: "DO0104"
- name: Read settings
id: ReadSettings
uses: microsoft/AL-Go/Actions/ReadSettings@6a9ef0c91e5b54d0fd3abb3d4495417a1db28f17
with:
shell: powershell
- 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@6a9ef0c91e5b54d0fd3abb3d4495417a1db28f17
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: ${{ needs.Initialization.outputs.githubRunnerShell }}
runsOn: ${{ needs.Initialization.outputs.githubRunner }}
checkoutRef: refs/pull/${{ github.event.number }}/merge
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }}
project: ${{ matrix.project }}
projectName: ${{ matrix.projectName }}
buildMode: ${{ matrix.buildMode }}
projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }}
baselineWorkflowRunId: ${{ needs.Initialization.outputs.baselineWorkflowRunId }}
secrets: 'licenseFileUrl,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString'
publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }}
artifactsNameSuffix: 'PR${{ github.event.number }}'
StatusCheck:
needs: [ Initialization, Build ]
if: (!cancelled())
runs-on: [ windows-latest ]
name: Pull Request Status Check
steps:
- name: Pull Request Status Check
id: PullRequestStatusCheck
uses: microsoft/AL-Go/Actions/PullRequestStatusCheck@6a9ef0c91e5b54d0fd3abb3d4495417a1db28f17
env:
GITHUB_TOKEN: ${{ github.token }}
with:
shell: powershell