Skip to content

Build README

Build README #15978

Workflow file for this run

name: Build README
on:
push:
workflow_dispatch:
schedule:
- cron: '32 */4 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
id: setup_python
with:
python-version: '3.11'
- name: Cache virtualenv
uses: actions/cache@v3
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('requirements.txt') }}
path: venv
- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
python -m pip install -r requirements.txt
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
- name: Update README
run: |-
python build_readme.py
cat README.md
- name: Commit and push if README changed
run: |-
git diff
git config --global user.email "bot@adamj.eu"
git config --global user.name "Adam's Bot"
git diff --quiet || (git add README.md && git commit -m "Updated README")
git push