-
Notifications
You must be signed in to change notification settings - Fork 314
33 lines (30 loc) · 1.14 KB
/
alert-update-flags.yaml
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
name: alert-update-flags
on:
workflow_dispatch:
push:
branches: [master]
paths:
- "internal/console/assets/*-flags.json"
jobs:
notification-update-flags:
name: Send email with flag changes
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Execute diff and send email
env:
AWS_REGION: ${{ secrets.EMAIL_AWS_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.EMAIL_AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.EMAIL_AWS_SECRET_KEY }}
run: |
for item in internal/console/assets/*-flags.json; do cat $item > $item-curr; done;
git checkout HEAD~1
for item in internal/console/assets/*-flags.json; do cat $item > $item-old; done;
printf -v curr "'%s'," internal/console/assets/*-flags.json-curr
printf -v old "'%s'," internal/console/assets/*-flags.json-old
pip3 install -r .github/scripts/watchers/requirements.txt
python3 -u .github/scripts/watchers/change-flags-email.py \
-n $(echo "${curr%,}") -o $(echo "${old%,}")