-
Notifications
You must be signed in to change notification settings - Fork 124
42 lines (36 loc) · 991 Bytes
/
generate-readme.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
40
41
42
name: Update readme
on:
pull_request:
branches: [main]
paths: [data/*]
push:
branches: [main]
paths: [data/*]
jobs:
make-readme:
if: github.repository_owner == 'janosh' # don't run on forks
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: pip install pyyaml
- name: Run make_readme.py
run: python data/make_readme.py
- name: Push changes if any
run: |
if git diff --quiet readme.md; then
echo "No changes to commit"
exit 0
fi
git config user.name 'Janosh Riebesell'
git config user.email janosh.riebesell@gmail.com
git add readme.md
git commit -m 'update readme'
git push