update_versions #1
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_versions | |
on: | |
schedule: | |
- cron: "0 0 * * 1" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Update version file | |
run: | | |
cd assets | |
python -m pip install requests | |
python -m pip install bs4 | |
python get_versions.py | |
- name: Push updated version file | |
run: | | |
pwd | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]"github-actions[bot] | |
if [[ -n $(git status -s) ]]; then | |
git add . | |
git commit -m "chore(versions.txt): update Cmake version file" | |
git push https://github-actions[bot]:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
else | |
echo "never updated." | |
fi |