chore: send slack notification when Github Action fails (#28310)

chore: send slack notification when github action fails
This commit is contained in:
Yihau Chen 2022-10-12 15:52:00 +08:00 committed by GitHub
parent 3f63283eda
commit 9fe46bb038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 0 deletions

View File

@ -71,3 +71,12 @@ jobs:
with:
command: build
args: -p solana-client --target ${{ matrix.target }}
- name: Send Slack notifiaction
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: ${{ secrets.SLACK_CHANNEL }}
status: FAILED
color: danger

View File

@ -68,3 +68,13 @@ jobs:
./build.sh
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- name: Send Slack notifiaction
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: ${{ secrets.SLACK_CHANNEL }}
status: FAILED
color: danger

View File

@ -25,3 +25,12 @@ jobs:
chmod +x ./ci/export-github-repo.sh
./ci/export-github-repo.sh web3.js/ solana-web3.js
shell: bash
- name: Send Slack notifiaction
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: ${{ secrets.SLACK_CHANNEL }}
status: FAILED
color: danger

View File

@ -17,3 +17,17 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
send-slack-notification:
runs-on: ubuntu-20.04
needs:
- release-artifacts
if: failure()
steps:
- env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: ${{ secrets.SLACK_CHANNEL }}
status: FAILED
color: danger