mirror of
https://github.com/tiennm99/loldle.git
synced 2026-09-03 00:18:07 +00:00
The loldle repo is archived and read-only, so every push after a data update failed with a 403. Consumers read champions.json from this repo directly instead. Checkout no longer overrides the token: the PAT existed only so the data commit would trigger the sync workflow, and contents: write on the default GITHUB_TOKEN covers the push.
38 lines
901 B
YAML
38 lines
901 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@v5
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
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 CHAMPIONS.md
|
|
if git diff --cached --quiet; then
|
|
echo "No changes to commit"
|
|
exit 0
|
|
fi
|
|
git commit -m "chore: update champions data to latest patch"
|
|
git push
|