From ba543c40a892d451f1ebbcc9f4d421c4273cb291 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Mon, 23 Dec 2024 15:08:04 +1100 Subject: [PATCH] ci.yml: Add comments --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f2da12..9fc217c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,6 +131,7 @@ jobs: - name: Generate Deployment Target Matrix id: target + # These are used in the deploy job to determine the targets to deploy to - irrespective of the type of deployment. run: | targets=$(jq --raw-output --compact-output '.deployment | keys' config/settings.json) echo "$targets" @@ -169,7 +170,7 @@ jobs: - name: Exit if no write permissions if: steps.commenter.outputs.has-permission == 'false' run: | - echo "User ${{ github.event.comment.user.login }} doesn't have 'write' permission on ${{ github.repository }}, not allowing deployment" + echo "::error::User ${{ github.event.comment.user.login }} doesn't have 'write' permission on ${{ github.repository }}, not allowing deployment" exit 1 - name: Set Commit Status Args @@ -195,6 +196,7 @@ jobs: strategy: fail-fast: false matrix: + # Example: ['Gadi', 'Setonix', ...] target: ${{ fromJson(needs.defaults.outputs.targets) }} uses: access-nri/build-cd/.github/workflows/deploy-1-setup.yml@main with: @@ -261,6 +263,7 @@ jobs: - name: Create deployment message id: matrix-output-parser # Outputs defined in deploy-1-setup.yml under the outputs-upload job + # Creates a comment of the form: https://github.com/ACCESS-NRI/ACCESS-TEST/pull/15#issuecomment-2558675980 run: | echo "deployments-message<> $GITHUB_OUTPUT @@ -329,6 +332,7 @@ jobs: - name: Deployment status roll up id: deployment-rollup # Roll up the deployment status from each of the files, and return the overall result + # In other words, if any of the deployments are not a success (AKA, failure/skipped/cancelled), then the overall status is failure run: | echo "errors=$(jq --slurp 'map(.deployment_result == "success") | all | not' ${{ env.OUTPUT_ARTIFACT_PATH }}/*)" >> $GITHUB_OUTPUT