chore: auto-update README with latest summer schools #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update README | |
on: | |
push: | |
paths: | |
- 'site/_data/summerschools.yml' | |
pull_request: | |
paths: | |
- 'site/_data/summerschools.yml' | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
pip install pyyaml | |
pip install python-dateutil | |
- name: Update README | |
run: | | |
python scripts/update_readme.py | |
- name: Commit changes | |
run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
git add README.md | |
git diff --quiet && git diff --staged --quiet || git commit -m "chore: auto-update README with latest summer schools" | |
git push |