-
-
Notifications
You must be signed in to change notification settings - Fork 212
35 lines (31 loc) · 975 Bytes
/
update_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
name: Update README
on:
workflow_dispatch:
push:
branches: [ "master" ]
paths:
- 'Rotations/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
id: python3
with:
python-version: '3.10'
cache: 'pip'
- name: pip install dependencies
run: pip install -r "$GITHUB_WORKSPACE/.github/scripts/requirements.txt"
- name: Run Python README updater
run: ${{ steps.python3.outputs.python-path }} "$GITHUB_WORKSPACE/.github/scripts/update_readme.py" "$GITHUB_WORKSPACE"
- name: Commit changes
run: |
git diff
git config --global user.email "actions@users.noreply.github.com"
git config --global user.name "README Bot"
git add README.md
git commit -m "Updated README.md from rotation metadata" || exit 0
git push