-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
16 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ jobs: | |
continue-on-error: true | ||
outputs: | ||
should_notify: ${{ steps.check_status.outputs.result }} | ||
job_id: ${{ job }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: mozilla-actions/[email protected] | ||
|
@@ -60,10 +61,23 @@ 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. | ||
# 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 |