Skip to content

Commit

Permalink
Merge pull request #9527 from internetarchive/update-cron-watcher
Browse files Browse the repository at this point in the history
Update `cron_watcher` Slack channel and message
  • Loading branch information
mekarpeles authored Jul 6, 2024
2 parents 968ffdf + ebdc4f1 commit 5a427bf
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 5a427bf

Please sign in to comment.