update_etcd_versions #81
This file contains hidden or 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_etcd_versions | |
| on: | |
| schedule: | |
| - cron: "0 3 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update_etcd_versions: | |
| runs-on: ubuntu-latest | |
| 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 packaging | |
| python get_all_etcd_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 etcd version file" | |
| git push https://github-actions[bot]:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
| else | |
| echo "never updated." | |
| fi |