Files
loldle/data/.github/workflows/update-champions.yml
T
tiennm99 04dcf74746 fix: add write permissions to update-champions workflow
The workflow failed because the default GITHUB_TOKEN lacked write
access, causing `git push` to return 403.
2026-04-16 14:42:05 +07:00

35 lines
848 B
YAML

name: Update champions data
on:
schedule:
# Every Thursday at 06:00 UTC (day after Riot's Wednesday patch)
- cron: "0 6 * * 4"
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run scraper
run: go run .
- name: Commit and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add champions.json
git diff --cached --quiet && echo "No changes to commit" && exit 0
git commit -m "chore: update champions data to latest patch"
git push