Skip to content

Add auto-format yaml pre-commit hook #115

Add auto-format yaml pre-commit hook

Add auto-format yaml pre-commit hook #115

Workflow file for this run

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