chore(ci): remove sync workflow; loldle-data now pushes directly

This commit is contained in:
2026-04-20 18:33:20 +07:00
parent 6de35d3e4f
commit 8ff581cfb8
-50
View File
@@ -1,50 +0,0 @@
name: Sync loldle data
on:
repository_dispatch:
types: [loldle-data-updated]
workflow_dispatch:
schedule:
# Safety net: runs Friday 07:00 UTC (~25h after loldle-data's Thursday job)
# in case the dispatch event was missed.
- cron: "0 7 * * 5"
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Download latest champions.json
run: |
curl -fsSL -o src/modules/loldle/champions.json.new \
https://raw.githubusercontent.com/tiennm99/loldle-data/main/champions.json
- name: Compare and replace
id: diff
run: |
if cmp -s src/modules/loldle/champions.json src/modules/loldle/champions.json.new; then
echo "No changes."
rm src/modules/loldle/champions.json.new
echo "changed=false" >> "$GITHUB_OUTPUT"
else
mv src/modules/loldle/champions.json.new src/modules/loldle/champions.json
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Regenerate champions-data.js
if: steps.diff.outputs.changed == 'true'
run: node scripts/build-loldle-data.js
- name: Commit and push
if: steps.diff.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add src/modules/loldle/champions.json src/modules/loldle/champions-data.js
git commit -m "chore(loldle): sync champions.json from loldle-data"
git push