Update repository with latest information #1197
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 table" | |
on: | |
push: | |
schedule: | |
# each day at 4:40 | |
- cron: '40 4 * * *' | |
workflow_dispatch: | |
jobs: | |
update_readme_table: | |
name: "Update README table" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout to workspace | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
- name: Print all environment variables | |
run: printenv | |
- name: Set bot's name and email | |
run: | | |
git config --global user.name "Github Action" | |
git config --global user.email "[email protected]" | |
- name: Install requirements.txt | |
run: | | |
python -m pip install -U setuptools | |
python -m pip install -U pip | |
python -m pip install -r util/requirements.txt | |
- name: Update README.rst table | |
run: python util/update-readme-table.py README.rst . | |
- name: Commit changed README.rst | |
if: always() | |
run: | | |
git add README.rst && \ | |
(git commit -m "[Github Action] Update README table with valid information" || true) && \ | |
git checkout . && \ | |
git pull origin ${GITHUB_REF##*/} --rebase --strategy-option=ours | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
branch: ${{ github.ref }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} |