Skip to content

Commit

Permalink
ci.yml: Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeGat committed Dec 23, 2024
1 parent 7467736 commit ba543c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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<<EOF" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ba543c4

Please sign in to comment.