mirror of
https://github.com/tiennm99/loldle.git
synced 2026-10-11 03:13:42 +00:00
feat: add champions.json sync workflow to loldle repo
Track champions.json in git and add GitHub Action that copies it to tiennm99/loldle/public/champions.json on push.
This commit is contained in:
1 parent
cfa664f217
commit
1e7a05e591
3 files changed
+3473
-3
No files matched your search
+31
@@ -0,0 +1,31 @@
|
|||||||
|
name: Sync champions.json to loldle
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
paths: [champions.json]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout loldle-data
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Checkout loldle
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: tiennm99/loldle
|
||||||
|
token: ${{ secrets.LOLDLE_PAT }}
|
||||||
|
path: loldle
|
||||||
|
|
||||||
|
- name: Copy and commit
|
||||||
|
run: |
|
||||||
|
cp champions.json loldle/public/champions.json
|
||||||
|
cd loldle
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add public/champions.json
|
||||||
|
git diff --cached --quiet && echo "No changes" && exit 0
|
||||||
|
git commit -m "chore: update champions.json from loldle-data"
|
||||||
|
git push
|
||||||
@@ -24,9 +24,6 @@ profile.cov
|
|||||||
go.work
|
go.work
|
||||||
go.work.sum
|
go.work.sum
|
||||||
|
|
||||||
# Output
|
|
||||||
champions.json
|
|
||||||
|
|
||||||
# Reference clone
|
# Reference clone
|
||||||
LoLdleData/
|
LoLdleData/
|
||||||
|
|
||||||
|
|||||||
+3442
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user