-
Notifications
You must be signed in to change notification settings - Fork 7
35 lines (31 loc) · 1017 Bytes
/
cron.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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