From aef2ca23423b8f849b95a44d7ca4d6390413df71 Mon Sep 17 00:00:00 2001 From: Seungpyo1007 Date: Tue, 2 Jun 2026 02:17:39 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat(ci):=20reverse=20submodule=20sync=20?= =?UTF-8?q?=E2=80=94=20bump=20TechAPI=20pointer=20on=20dispatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add bump-techapi.yml: on a repository_dispatch (techapi-updated) from TechAPI, advance this repo's TechAPI submodule gitlink to TechAPI's latest main (payload sha, or remote HEAD fallback), commit and push to main. Idempotent no-op when already current; also runnable via workflow_dispatch. Loop-safe: the bump is pushed with GITHUB_TOKEN, whose pushes do not trigger other workflows, so notify-techapi never fires on it. Mirrors TechAPI's bump-engine.yml; needs TechAPI to add a notify-engine.yml sender (with paths-ignore on its TechEngine gitlink). --- .github/workflows/bump-techapi.yml | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/bump-techapi.yml diff --git a/.github/workflows/bump-techapi.yml b/.github/workflows/bump-techapi.yml new file mode 100644 index 0000000..60e74a2 --- /dev/null +++ b/.github/workflows/bump-techapi.yml @@ -0,0 +1,58 @@ +name: bump-techapi + +# Reverse of notify-techapi: advance THIS repo's TechAPI submodule pointer to +# TechAPI's latest main. Triggered by a repository_dispatch (`techapi-updated`) +# that TechAPI's notify-engine.yml sends on a real data/site change, or run +# manually. Keeps the "TechAPI @ " browsing link from going stale. +# +# Loop-safe by construction: +# * the bump commit is pushed with the default GITHUB_TOKEN, and pushes made +# by GITHUB_TOKEN do NOT trigger other workflows — so notify-techapi never +# fires on it and there is no ping-pong back to TechAPI; +# * TechAPI's notify-engine.yml must `paths-ignore` its own TechEngine gitlink +# so it doesn't dispatch on bump-only commits (sender-side guard); +# * the bump is idempotent — if the pointer already matches, it no-ops. +on: + repository_dispatch: + types: [techapi-updated] + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: bump-techapi + cancel-in-progress: false + +jobs: + bump: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: main + + - name: Bump TechAPI submodule pointer to TechAPI main + env: + PAYLOAD_SHA: ${{ github.event.client_payload.sha }} + run: | + set -euo pipefail + # Prefer the sha from the dispatch payload; fall back to remote main HEAD + # (covers manual runs and payload-less dispatches). + SHA="${PAYLOAD_SHA:-}" + if [ -z "$SHA" ]; then + SHA=$(git ls-remote https://github.com/Seungpyo1007/TechAPI.git refs/heads/main | awk '{print $1}') + fi + if [ -z "$SHA" ]; then + echo "::error::could not resolve TechAPI main sha"; exit 1 + fi + CUR=$(git ls-tree HEAD TechAPI | awk '{print $3}') + if [ "$SHA" = "$CUR" ]; then + echo "TechAPI pointer already at ${SHA:0:7}; nothing to do." + exit 0 + fi + git update-index --cacheinfo "160000,${SHA},TechAPI" + git config user.name "techengine-bot" + git config user.email "techengine-bot@users.noreply.github.com" + git commit -m "chore: bump TechAPI submodule to ${SHA:0:7}" + git push origin main From 4bcce4ebf13925859f8f9727380a062ff2c5edb3 Mon Sep 17 00:00:00 2001 From: Seungpyo1007 Date: Tue, 2 Jun 2026 02:17:39 +0900 Subject: [PATCH 2/3] refactor(ci): reduce refresh-data to a dump smoke-test Drop the weekly cron from refresh-data.yml (it duplicated weekly-refresh.yml, which now owns the Monday enrich+gate+dump+PR run). Keep the push:app/** + manual triggers so a change to engine code still verifies that app.dump generates end-to-end. --- .github/workflows/refresh-data.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/refresh-data.yml b/.github/workflows/refresh-data.yml index 0e4b056..d77e432 100644 --- a/.github/workflows/refresh-data.yml +++ b/.github/workflows/refresh-data.yml @@ -1,12 +1,11 @@ name: refresh-data -# Static-dump refresh (git-scraping pattern). -# Pulls the latest TechAPI data, validates, regenerates dump/. -# - weekly schedule keeps the static dump fresh -# - manual trigger for on-demand rebuilds +# Dump smoke-test: when engine code (app/**) changes, rebuild the static dump +# from the latest TechAPI data and validate it — a fast guard that `app.dump` +# still generates end-to-end. The weekly full refresh (enrich + integrity gate + +# dump + PR to TechAPI) lives in weekly-refresh.yml; this no longer runs on a +# schedule, to avoid duplicating that Monday run. on: - schedule: - - cron: "17 6 * * 1" # Mondays 06:17 UTC (offset minute is polite, per git-scraping) push: branches: [main] paths: From 2ecc49739e2352da7e3a4d72eec4debfb9c2c367 Mon Sep 17 00:00:00 2001 From: Seungpyo1007 Date: Tue, 2 Jun 2026 02:30:08 +0900 Subject: [PATCH 3/3] feat(ci): ignore TechAPI gitlink-only pushes in notify-techapi Add paths-ignore: [TechAPI] so commits that only move the TechAPI submodule pointer (bump-techapi.yml's bumps) don't dispatch engine-updated. Symmetric with TechAPI's notify-engine ignoring its TechEngine gitlink, converging each real change to exactly one bump. --- .github/workflows/notify-techapi.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/notify-techapi.yml b/.github/workflows/notify-techapi.yml index 32450d5..cc98393 100644 --- a/.github/workflows/notify-techapi.yml +++ b/.github/workflows/notify-techapi.yml @@ -9,6 +9,12 @@ name: notify-techapi on: push: branches: [main] + # Don't ping TechAPI for commits that only move the TechAPI submodule pointer + # (bump-techapi.yml's own bumps): TechAPI doesn't need to track those, and + # skipping them keeps each real change to exactly one bump — symmetric with + # TechAPI's notify-engine.yml ignoring its TechEngine gitlink. + paths-ignore: + - TechAPI permissions: contents: read