update_elixir_versions #18
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_elixir_versions | |
on: | |
schedule: | |
- cron: "0 16 * * 2" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
update_elixir_versions: | |
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 packaging | |
python get_all_elixir_versions.py | |
python get_all_elixir_win_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 Elixir version file" | |
git push https://github-actions[bot]:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
else | |
echo "never updated." | |
fi |