Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reusable workflow for scheduled jobs to notify on slack. #3873

Merged
merged 7 commits into from
Feb 20, 2024
Merged
17 changes: 17 additions & 0 deletions .github/workflows/slack-notify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This re-usable workflow file will trigger a Slack notification on the channel configure via the Webhook URL.
# It currently comments a number of fields, but you can add or remove them as you see fit.
#
# To configure a Slack Webhook URL, follow the instructions here: https://api.slack.com/messaging/webhooks
on:
workflow_call:

jobs:
slack-notify:
runs-on: ubuntu-latest
steps:
- uses: 8398a7/action-slack@v3
with:
status: 'failure'
chatton marked this conversation as resolved.
Show resolved Hide resolved
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
Loading