From 2eb6b471d89e7d1f37331db22dd04b30621e7c19 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 20 Apr 2026 18:34:32 +0700 Subject: [PATCH] ci: also push champions data to loldle repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors the miti99bot push step — clones tiennm99/loldle, copies champions.json into public/, commits and pushes. Gated on LOLDLE_PUSH_TOKEN secret; step is a no-op when unset. --- .github/workflows/update-champions.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/update-champions.yml b/.github/workflows/update-champions.yml index fd4a37d..e7d2426 100644 --- a/.github/workflows/update-champions.yml +++ b/.github/workflows/update-champions.yml @@ -59,3 +59,23 @@ jobs: git config user.email "github-actions[bot]@users.noreply.github.com" git commit -m "chore(loldle): sync champions data from loldle-data@${GITHUB_SHA::7}" git push + + - name: Push to loldle + if: steps.commit.outputs.changed == 'true' && env.LOLDLE_PUSH_TOKEN != '' + env: + LOLDLE_PUSH_TOKEN: ${{ secrets.LOLDLE_PUSH_TOKEN }} + run: | + set -euo pipefail + git clone --depth 1 \ + "https://x-access-token:${LOLDLE_PUSH_TOKEN}@github.com/tiennm99/loldle.git" loldle + cp champions.json loldle/public/champions.json + cd loldle + git add public/champions.json + if git diff --cached --quiet; then + echo "loldle already up to date" + exit 0 + fi + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git commit -m "chore(data): sync champions data from loldle-data@${GITHUB_SHA::7}" + git push