Readme Updater #79
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: Readme Updater | |
on: | |
schedule: | |
- cron: '0 0 * * 1' | |
workflow_dispatch: | |
jobs: | |
regen: | |
name: Regenerate the README.md file | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Generate new README.md | |
run: python ${{ github.workspace }}/generate_readme.py | |
- name: Check if commit is needed | |
run: echo "COMMIT_NEEDED=$(python ${{ github.workspace }}/.github/workflows/readme_check.py ${{ github.workspace }})" >> $GITHUB_ENV | |
- name: Commit changes | |
if: ${{ env.COMMIT_NEEDED == 'true' }} | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git commit --all -m "Regenerated README.md" | |
git push |