Add Seller Order Reference to ZUGFeRD Export + OnAfterInsertApplicableHeaderTradeAgreement Event #2329
Workflow file for this run
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: 'Pull Request Build' | |
| on: | |
| pull_request: | |
| branches: [ 'main' ] | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'merge_group' && github.run_id || github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: powershell | |
| permissions: | |
| actions: read | |
| contents: read | |
| id-token: write | |
| pull-requests: read | |
| security-events: write | |
| packages: 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@0c7b1de38ba518aaf5fdee3902c2d2ae886ede32 | |
| Initialization: | |
| needs: [ PregateCheck ] | |
| if: (!failure() && !cancelled()) | |
| runs-on: [ windows-latest ] | |
| outputs: | |
| projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} | |
| projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} | |
| buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} | |
| baselineWorkflowRunId: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowRunId }} | |
| baselineWorkflowSHA: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowSHA }} | |
| 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@0c7b1de38ba518aaf5fdee3902c2d2ae886ede32 | |
| with: | |
| shell: powershell | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| lfs: true | |
| ref: ${{ github.event_name == 'pull_request' && github.sha || github.event_name == 'merge_group' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} | |
| - name: Initialize the workflow | |
| id: init | |
| uses: microsoft/AL-Go/Actions/WorkflowInitialize@0c7b1de38ba518aaf5fdee3902c2d2ae886ede32 | |
| with: | |
| shell: powershell | |
| - name: Read settings | |
| id: ReadSettings | |
| uses: microsoft/AL-Go/Actions/ReadSettings@0c7b1de38ba518aaf5fdee3902c2d2ae886ede32 | |
| with: | |
| shell: powershell | |
| 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 | |
| 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@0c7b1de38ba518aaf5fdee3902c2d2ae886ede32 | |
| 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 }} | |
| checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || github.event_name == 'merge_group' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} | |
| project: ${{ matrix.project }} | |
| projectName: ${{ matrix.projectName }} | |
| buildMode: ${{ matrix.buildMode }} | |
| projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} | |
| baselineWorkflowRunId: ${{ needs.Initialization.outputs.baselineWorkflowRunId }} | |
| baselineWorkflowSHA: ${{ needs.Initialization.outputs.baselineWorkflowSHA }} | |
| 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') && (github.event_name != 'merge_group') | |
| runs-on: [ windows-latest ] | |
| name: Code Analysis Processing | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| ref: ${{ format('refs/pull/{0}/head', github.event.pull_request.number) }} | |
| - name: Download artifacts - ErrorLogs | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.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@0c7b1de38ba518aaf5fdee3902c2d2ae886ede32 | |
| with: | |
| shell: powershell | |
| - name: Upload SARIF file to GitHub | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: (success() || failure()) && (hashFiles(format('{0}/ErrorLogs/output.sarif.json',github.workspace)) != '') | |
| 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()) | |
| runs-on: [ windows-latest ] | |
| name: Pull Request Status Check | |
| steps: | |
| - name: Pull Request Status Check | |
| id: PullRequestStatusCheck | |
| uses: microsoft/AL-Go/Actions/PullRequestStatusCheck@0c7b1de38ba518aaf5fdee3902c2d2ae886ede32 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| shell: powershell | |
| - name: Finalize the workflow | |
| id: PostProcess | |
| uses: microsoft/AL-Go/Actions/WorkflowPostProcess@0c7b1de38ba518aaf5fdee3902c2d2ae886ede32 | |
| if: success() || failure() | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| shell: powershell | |
| telemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | |
| currentJobContext: ${{ toJson(job) }} |