-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1008 Bytes
/
fetch.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
---
# adapted from:
# - https://simonwillison.net/2020/Oct/9/git-scraping/
name: "fetch info from start.gg api"
on:
workflow_dispatch:
schedule:
- cron: '*/30 * * * *'
jobs:
fetch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: fetch info from api
run: |
# download latest binary from release
gh release download --pattern 'netplay-bracket-finder'
chmod +x ./netplay-bracket-finder
stat ./netplay-bracket-finder
# fetch info from API
./netplay-bracket-finder | tee docs/events.json
env:
GRAPHQL_API_TOKEN: ${{ secrets.GRAPHQL_API_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: push changes
run: |
git config user.name "randall the cloud"
git config user.email actions@users.noreply.github.com
git add docs/events.json
git commit -m "fetched: $(date -u)" || exit 0
git push || true