Skip to content

Commit

Permalink
Fail check on error, format message
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Oct 25, 2024
1 parent 8273c11 commit 62eef9c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/missing-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
continue-on-error: true
outputs:
should_notify: ${{ steps.check_status.outputs.result }}
job_id: ${{ job.container.id }}
steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/sccache-action@v0.0.6
Expand Down Expand Up @@ -60,10 +61,24 @@ jobs:
if: ${{ needs.missing-optypes.outputs.should_notify == 'true' }}
with:
channel-id: 'C04SHCL4FKP'
slack-message: '`tket-json-rs` is missing OpType definitions. See the failing check for more info.\nhttps://github.com/CQCL/tket-json-rs/actions/workflows/missing-ops.yml'
slack-message: |
`tket-json-rs` is missing OpType definitions.
See <https://github.com/CQCL/tket-json-rs/actions/runs/${{ github.run_id }}/job/${{ needs.missing-optypes.outputs.job_id }}|the failing check> for more info.
# https://github.com/CQCL/tket-json-rs/actions/runs/11516498588/job/32059316409?pr=84
# An unique identifier for the message type, to use in rate limiting.
message-label: "missing-op"
# Rate-limit the message to once per week
timeout-minutes: 10080
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

# This is required since `missing-optypes` is set to continue-on-error,
# and we want to ultimately fail the check after notifying.
fail-on-missing-optypes:
name: Fail the build on missing op types
runs-on: ubuntu-latest
needs: missing-optypes
if: ${{ needs.missing-optypes.outputs.should_notify == 'true' }}
steps:
- name: Fail the build
run: exit 1

0 comments on commit 62eef9c

Please sign in to comment.