Skip to content

Commit

Permalink
ci: send slack msg on nightly build failure (MystenLabs#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
brad-mysten authored Jun 27, 2022
1 parent 1f97906 commit ed3d6ad
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,31 @@ jobs:
cargo hakari disable
cargo hakari remove-deps -y
RUSTC_BOOTSTRAP=1 cargo udeps
report-status:
name: Report Status
runs-on: [self-hosted, self-hosted-ubuntu]
if: always()
needs: [beta, release, cargo-udeps]
steps:
- name: Post to slack
uses: slackapi/[email protected]
uses: technote-space/workflow-conclusion-action@v3
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure
with:
channel-id: 'build-failures-sui'
payload: |
{
"text": "Workflow ${{ github.workflow }} failed\nLogs are here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Workflow ${{ github.workflow }} failed\nLogs are here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
]
}

0 comments on commit ed3d6ad

Please sign in to comment.