Fetch data #1
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: Fetch data | |
on: | |
schedule: | |
# Runs at 00:00 UTC. | |
- cron: "0 0 * * *" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Fetch | |
run: go run ./cmd/fetch | |
- name: Commit | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add -f src/contests.json public/users/ | |
git diff-index --quiet HEAD || git commit -m "Fetch data" | |
- name: Push | |
run: git push |