Updater #76705
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: Updater | |
on: | |
schedule: | |
- cron: "*/15 * * * *" | |
workflow_dispatch: | |
jobs: | |
update-releases: | |
name: Sync with upstream | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: upstream | |
fetch-depth: 1 | |
- name: Update | |
shell: bash | |
run: | | |
for game in "fishfolk/jumpy" "fishfolk/punchy" \ | |
"thetawavegame/thetawave" "spicylobstergames/astratomic"; do | |
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
"https://api.github.com/repos/${game}/releases?per_page=100" > "${game#*/}.json" | |
done | |
- name: Commit | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
set +e | |
git add *.json | |
git commit -m "Update releases" | |
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git upstream |