Skip to content

Commit

Permalink
notify slack on nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Apr 18, 2024
1 parent 5d12c0e commit 04e6ee2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- cron: '15 12 * * *'
jobs:
make:
environment:
TERM: xterm-256color
permissions:
contents: read
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -74,3 +76,12 @@ jobs:
echo "Failed to bring up site"
exit 1
fi
- name: Notify Slack on nightly test failure
if: failure() && github.event_name == 'schedule'
run: |-
curl -s -o /dev/null -XPOST $SLACK_WEBHOOK_URL -d '{
"text": "🚨 Scheduled job failed! Click to view the run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub Actions Run>",
}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit 04e6ee2

Please sign in to comment.