Skip to content

Build README

Build README #2279

Workflow file for this run

name: Build README
on:
push:
workflow_dispatch:
schedule:
- cron: '36 8 * * *'
- cron: '36 14 * * *'
- cron: '36 21 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: actions/cache@v3
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
working-directory: profile
run: |
python -m pip install -r requirements.txt
- name: Update README
working-directory: profile
run: |-
python dynamic_readme.py
cat README.md
- name: Commit and push if README changed
working-directory: profile
run: |-
git diff
git config --global user.name "cdkbot"
git config --global user.email "[email protected]"
git diff --quiet || (git add README.md && git commit -m "Updated README")
git push