generated from microsoft/AL-Go-PTE
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
675 additions
and
362 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,13 @@ on: | |
description: Direct Download Url of .app or .zip file | ||
required: true | ||
directCommit: | ||
description: Direct COMMIT (Y/N) | ||
required: false | ||
default: 'N' | ||
description: Direct Commit? | ||
type: boolean | ||
default: false | ||
useGhTokenWorkflow: | ||
description: Use GhTokenWorkflow for Pull Request/COMMIT | ||
description: Use GhTokenWorkflow for PR/Commit? | ||
type: boolean | ||
default: false | ||
|
||
permissions: | ||
contents: write | ||
|
@@ -34,34 +35,40 @@ env: | |
|
||
jobs: | ||
AddExistingAppOrTestApp: | ||
needs: [ ] | ||
runs-on: [ windows-latest ] | ||
steps: | ||
- name: Dump Workflow Information | ||
uses: microsoft/AL-Go-Actions/[email protected] | ||
with: | ||
shell: powershell | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Initialize the workflow | ||
id: init | ||
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v4.0 | ||
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v4.1 | ||
with: | ||
shell: powershell | ||
eventId: "DO0090" | ||
|
||
- name: Read settings | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.0 | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1 | ||
with: | ||
shell: powershell | ||
|
||
- name: Read secrets | ||
id: ReadSecrets | ||
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.0 | ||
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.1 | ||
with: | ||
shell: powershell | ||
gitHubSecrets: ${{ toJson(secrets) }} | ||
getSecrets: 'TokenForPush' | ||
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' | ||
|
||
- name: Add existing app | ||
uses: microsoft/AL-Go-Actions/AddExistingApp@v4.0 | ||
uses: microsoft/AL-Go-Actions/AddExistingApp@v4.1 | ||
with: | ||
shell: powershell | ||
token: ${{ steps.ReadSecrets.outputs.TokenForPush }} | ||
|
@@ -72,7 +79,7 @@ jobs: | |
|
||
- name: Finalize the workflow | ||
if: always() | ||
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v4.0 | ||
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v4.1 | ||
with: | ||
shell: powershell | ||
eventId: "DO0090" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,12 +24,15 @@ env: | |
|
||
jobs: | ||
Initialization: | ||
needs: [ ] | ||
runs-on: [ windows-latest ] | ||
outputs: | ||
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} | ||
environmentsMatrixJson: ${{ steps.DetermineDeploymentEnvironments.outputs.EnvironmentsMatrixJson }} | ||
environmentCount: ${{ steps.DetermineDeploymentEnvironments.outputs.EnvironmentCount }} | ||
deploymentEnvironmentsJson: ${{ steps.DetermineDeploymentEnvironments.outputs.DeploymentEnvironmentsJson }} | ||
generateALDocArtifact: ${{ steps.DetermineDeploymentEnvironments.outputs.GenerateALDocArtifact }} | ||
deployALDocArtifact: ${{ steps.DetermineDeploymentEnvironments.outputs.DeployALDocArtifact }} | ||
deliveryTargetsJson: ${{ steps.DetermineDeliveryTargets.outputs.DeliveryTargetsJson }} | ||
githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} | ||
githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} | ||
|
@@ -38,21 +41,26 @@ jobs: | |
buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} | ||
workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} | ||
steps: | ||
- name: Dump Workflow Information | ||
uses: microsoft/AL-Go-Actions/[email protected] | ||
with: | ||
shell: powershell | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
|
||
- name: Initialize the workflow | ||
id: init | ||
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v4.0 | ||
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v4.1 | ||
with: | ||
shell: powershell | ||
eventId: "DO0091" | ||
|
||
- name: Read settings | ||
id: ReadSettings | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.0 | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1 | ||
with: | ||
shell: powershell | ||
get: type | ||
|
@@ -64,40 +72,40 @@ jobs: | |
- name: Determine Projects To Build | ||
id: determineProjectsToBuild | ||
uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v4.0 | ||
uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v4.1 | ||
with: | ||
shell: powershell | ||
maxBuildDepth: ${{ env.workflowDepth }} | ||
|
||
- name: Determine Delivery Target Secrets | ||
id: DetermineDeliveryTargetSecrets | ||
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v4.0 | ||
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v4.1 | ||
with: | ||
shell: powershell | ||
projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}' | ||
checkContextSecrets: 'N' | ||
checkContextSecrets: 'false' | ||
|
||
- name: Read secrets | ||
id: ReadSecrets | ||
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.0 | ||
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.1 | ||
with: | ||
shell: powershell | ||
gitHubSecrets: ${{ toJson(secrets) }} | ||
getSecrets: ${{ steps.DetermineDeliveryTargetSecrets.outputs.ContextSecrets }} | ||
|
||
- name: Determine Delivery Targets | ||
id: DetermineDeliveryTargets | ||
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v4.0 | ||
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v4.1 | ||
env: | ||
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' | ||
with: | ||
shell: powershell | ||
projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}' | ||
checkContextSecrets: 'Y' | ||
checkContextSecrets: 'true' | ||
|
||
- name: Determine Deployment Environments | ||
id: DetermineDeploymentEnvironments | ||
uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v4.0 | ||
uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v4.1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
|
@@ -106,24 +114,24 @@ jobs: | |
type: 'CD' | ||
|
||
CheckForUpdates: | ||
runs-on: [ windows-latest ] | ||
needs: [ Initialization ] | ||
runs-on: [ windows-latest ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Read settings | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.0 | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1 | ||
with: | ||
shell: powershell | ||
get: templateUrl | ||
|
||
- name: Check for updates to AL-Go system files | ||
uses: microsoft/AL-Go-Actions/CheckForUpdates@v4.0 | ||
uses: microsoft/AL-Go-Actions/CheckForUpdates@v4.1 | ||
with: | ||
shell: powershell | ||
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | ||
templateUrl: ${{ env.templateUrl }} | ||
downloadLatest: true | ||
|
||
Build: | ||
needs: [ Initialization ] | ||
|
@@ -149,6 +157,53 @@ jobs: | |
signArtifacts: true | ||
useArtifactCache: true | ||
|
||
DeployALDoc: | ||
needs: [ Initialization, Build ] | ||
if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.generateALDocArtifact == 1 && github.ref_name == 'main' | ||
runs-on: windows-latest | ||
name: Deploy Reference Documentation | ||
permissions: | ||
contents: write | ||
actions: read | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: '.artifacts' | ||
|
||
- name: Read settings | ||
uses: microsoft/AL-Go-Actions/[email protected] | ||
with: | ||
shell: powershell | ||
|
||
- name: Setup Pages | ||
if: needs.Initialization.outputs.deployALDocArtifact == 1 | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Build Reference Documentation | ||
uses: microsoft/AL-Go-Actions/[email protected] | ||
with: | ||
shell: powershell | ||
artifacts: '.artifacts' | ||
|
||
- name: Upload pages artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: ".aldoc/_site/" | ||
|
||
- name: Deploy to GitHub Pages | ||
if: needs.Initialization.outputs.deployALDocArtifact == 1 | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
|
||
Deploy: | ||
needs: [ Initialization, Build ] | ||
if: always() && needs.Build.result == 'Success' && needs.Initialization.outputs.environmentCount > 0 | ||
|
@@ -168,7 +223,7 @@ jobs: | |
path: '.artifacts' | ||
|
||
- name: Read settings | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.0 | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1 | ||
with: | ||
shell: powershell | ||
|
||
|
@@ -181,15 +236,15 @@ jobs: | |
- name: Read secrets | ||
id: ReadSecrets | ||
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.0 | ||
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.1 | ||
with: | ||
shell: powershell | ||
gitHubSecrets: ${{ toJson(secrets) }} | ||
getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext,${{ steps.envName.outputs.envName }}-EnvironmentName,${{ steps.envName.outputs.envName }}_EnvironmentName,EnvironmentName,projects' | ||
|
||
- name: Deploy | ||
id: Deploy | ||
uses: microsoft/AL-Go-Actions/Deploy@v4.0 | ||
uses: microsoft/AL-Go-Actions/Deploy@v4.1 | ||
env: | ||
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' | ||
with: | ||
|
@@ -218,20 +273,20 @@ jobs: | |
path: '.artifacts' | ||
|
||
- name: Read settings | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.0 | ||
uses: microsoft/AL-Go-Actions/ReadSettings@v4.1 | ||
with: | ||
shell: powershell | ||
|
||
- name: Read secrets | ||
id: ReadSecrets | ||
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.0 | ||
uses: microsoft/AL-Go-Actions/ReadSecrets@v4.1 | ||
with: | ||
shell: powershell | ||
gitHubSecrets: ${{ toJson(secrets) }} | ||
getSecrets: '${{ matrix.deliveryTarget }}Context' | ||
|
||
- name: Deliver | ||
uses: microsoft/AL-Go-Actions/Deliver@v4.0 | ||
uses: microsoft/AL-Go-Actions/Deliver@v4.1 | ||
env: | ||
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' | ||
with: | ||
|
@@ -242,16 +297,16 @@ jobs: | |
artifacts: '.artifacts' | ||
|
||
PostProcess: | ||
needs: [ Initialization, Build, Deploy, Deliver, DeployALDoc ] | ||
if: (!cancelled()) | ||
runs-on: [ windows-latest ] | ||
needs: [ Initialization, Build, Deploy, Deliver ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Finalize the workflow | ||
id: PostProcess | ||
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v4.0 | ||
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v4.1 | ||
with: | ||
shell: powershell | ||
eventId: "DO0091" | ||
|
Oops, something went wrong.