Skip to content

Commit

Permalink
Update cron_watcher Slack channel and message
Browse files Browse the repository at this point in the history
  • Loading branch information
jimchamp authored Jul 5, 2024
1 parent 968ffdf commit ebdc4f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cron_watcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
shell: python
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
SLACK_CHANNEL_ABC_TEAM: ${{ secrets.SLACK_CHANNEL_ABC_TEAM }}
SLACK_CHANNEL_ABC_TEAM_PLUS: ${{ secrets.SLACK_CHANNEL_ABC_TEAM_PLUS }}
run: |
import os, sys, slack_sdk
token = os.getenv("SLACK_TOKEN")
channel = os.getenv("SLACK_CHANNEL_ABC_TEAM")
channel = os.getenv("SLACK_CHANNEL_ABC_TEAM_PLUS")
if token and channel:
slack_sdk.WebClient(token=token).chat_postMessage(channel=channel,
text="[cron_watcher](https://github.com/internetarchive/openlibrary/actions/workflows/cron_watcher.yml) has failed.",
text="<https://github.com/internetarchive/openlibrary/actions/workflows/cron_watcher.yml|`cron_watcher`> has failed.",
)
sys.exit(1)

0 comments on commit ebdc4f1

Please sign in to comment.