From 8273c11400147560be1cf9856d25e91936509a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= Date: Fri, 25 Oct 2024 11:10:32 +0100 Subject: [PATCH] ci: Quicker missing op notifications --- .github/workflows/missing-ops.yml | 32 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/missing-ops.yml b/.github/workflows/missing-ops.yml index 5513d47..e6fa0e2 100644 --- a/.github/workflows/missing-ops.yml +++ b/.github/workflows/missing-ops.yml @@ -9,8 +9,8 @@ on: - main workflow_dispatch: {} schedule: - # 08:00 weekly on Monday - - cron: '0 8 * * 1' + # 08:00 daily + - cron: '0 8 * * *' env: CARGO_TERM_COLOR: always @@ -21,6 +21,7 @@ jobs: missing-optypes: name: Check for missing op type definitions runs-on: ubuntu-latest + continue-on-error: true outputs: should_notify: ${{ steps.check_status.outputs.result }} steps: @@ -54,20 +55,15 @@ jobs: result-encoding: string notify-slack: + uses: CQCL/hugrverse-actions/.github/workflows/slack-notifier.yml@ab/slack-notifier needs: missing-optypes - runs-on: ubuntu-latest - if: ${{ needs.missing-optypes.outputs.should_notify == 'true' && github.event_name == 'schedule' }} - steps: - - name: Compose the slack message - id: make_msg - run: | - MSG="msg=`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" - echo $MSG - echo $MSG >> "$GITHUB_OUTPUT" - - name: Send notification - uses: slackapi/slack-github-action@v1.27.0 - with: - channel-id: 'C040CRWH9FF' - slack-message: ${{ steps.make_msg.outputs.msg }} - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} \ No newline at end of file + 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' + # 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 }} \ No newline at end of file