-
-
Notifications
You must be signed in to change notification settings - Fork 149
39 lines (35 loc) · 1.01 KB
/
build_json.yml
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
name: Build emails.json file from README
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
update:
name: Update the emails.json file
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- name: convert README to json
run: |
python convert_readme.py
- name: setup git config
run: |
git config user.name "Quincy Larson Emails Bot"
git config user.email "<>"
echo ::set-output name=is_changed::$(git status --porcelain)
- name: commit changes
run: |
if git status --porcelain | grep 'emails.json'; then
echo "Commiting changed emails.json file"
git add emails.json
git commit -m "update emails.json"
git push origin main
else
echo "No changes to be commited"
fi