Skip to content

Commit 5258b8e

Browse files
authored
Create slack-monitor-rotation.yml
1 parent e3676cd commit 5258b8e

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Weekly Slack Monitor Rotation
2+
3+
on:
4+
schedule:
5+
# Runs at 9:00 AM every Monday (UTC)
6+
- cron: '0 9 * * 1'
7+
# Also allow manual trigger for testing
8+
workflow_dispatch:
9+
10+
jobs:
11+
rotate-monitor:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.10'
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install requests
27+
28+
- name: Run rotation script
29+
env:
30+
SLACK_TOKEN: ${{ secrets.SLACK_MONITOR_APP_SLACK_TOKEN }}
31+
CHANNEL_ID: ${{ secrets.TEAM_UXD_PATTERNFLY_CHANNEL_ID }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
EXCLUDED_USERS: ${{ secrets.SLACK_MONITOR_EXCLUDED_USERS }}
34+
run: python scripts/slack_monitor_rotation.py

0 commit comments

Comments
 (0)