-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (39 loc) · 1.52 KB
/
ios-security-rotation.yml
File metadata and controls
46 lines (39 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Firefox iOS Security Monitor Rotation
on:
schedule:
- cron: '0 9 * * 1-5' # Every weekday at 9 AM UTC
workflow_dispatch:
jobs:
notify:
name: Pick security monitor and notify Slack
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
cache: 'pip'
- name: Pick name from schedule
id: pick
run: |
name=$(python slack-reminders/firefox-ios-security-monitor.py)
echo "security_monitor_name=$name" >> $GITHUB_OUTPUT
echo "date=$(date +'%B %d, %Y')" >> $GITHUB_OUTPUT
- name: Print current assignee if no rotation today
if: steps.pick.outputs.security_monitor_name == ''
run: |
current=$(python slack-reminders/firefox-ios-security-monitor.py --current)
echo "No rotation today. Current security monitor: $current"
- name: Send Slack notification if there is a new assignee starting today
if: steps.pick.outputs.security_monitor_name != ''
env:
security_monitor_name: ${{ steps.pick.outputs.security_monitor_name }}
date: ${{ steps.pick.outputs.date }}
uses: slackapi/slack-github-action@v3.0.1
with:
payload-file-path: slack-reminders/ios-security-rotation.json
payload-templated: true
webhook: ${{ secrets.SLACK_WEBHOOK_FIREFOX_IOS_DEV }}
webhook-type: incoming-webhook