Skip to content

Commit 65ddb4e

Browse files
committed
feat(ci): notify TechAPI to bump submodule on push to main
Add notify-techapi.yml: on every push to main, send a repository_dispatch (engine-updated) to Seungpyo1007/TechAPI so its bump-engine.yml advances the TechEngine submodule pointer to the new commit. Uses the existing TECHAPI_TOKEN (Contents:write is sufficient for the dispatches API). Also rename TECHAPI_PR_TOKEN -> TECHAPI_TOKEN in weekly-ingest.yml to match the actual secret; the mismatch was silently skipping the ingest PR step. coverage-report.yml is left untouched (its issue-posting needs Issues:write, decided separately).
1 parent e92aad8 commit 65ddb4e

2 files changed

Lines changed: 31 additions & 4 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: notify-techapi
2+
3+
# On every push to main, ping TechAPI so it bumps its TechEngine submodule
4+
# pointer to the new commit. The bump itself happens in TechAPI's bump-engine.yml
5+
# (triggered by this repository_dispatch); TechEngine only fires the signal.
6+
#
7+
# No loop: TechAPI's bump commit lands in TechAPI, never pushed back here.
8+
# Requires TECHAPI_TOKEN (Contents: write on Seungpyo1007/TechAPI) — already set.
9+
on:
10+
push:
11+
branches: [main]
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
notify:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Dispatch engine-updated to TechAPI
21+
uses: peter-evans/repository-dispatch@v3
22+
with:
23+
token: ${{ secrets.TECHAPI_TOKEN }}
24+
repository: Seungpyo1007/TechAPI
25+
event-type: engine-updated
26+
client-payload: |
27+
{"sha": "${{ github.sha }}", "ref": "${{ github.ref }}"}

.github/workflows/weekly-ingest.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
CATEGORY: ${{ inputs.category || 'cpu' }}
3232
LIMIT: ${{ inputs.limit || '50' }}
3333
INCLUDE_DRAFTS: ${{ inputs.include_drafts || 'false' }}
34-
TECHAPI_PR_TOKEN: ${{ secrets.TECHAPI_PR_TOKEN }}
34+
TECHAPI_TOKEN: ${{ secrets.TECHAPI_TOKEN }}
3535
steps:
3636
- uses: actions/checkout@v4
3737

@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
repository: Seungpyo1007/TechAPI
4343
path: TechAPI
44-
token: ${{ secrets.TECHAPI_PR_TOKEN || secrets.GITHUB_TOKEN }}
44+
token: ${{ secrets.TECHAPI_TOKEN || secrets.GITHUB_TOKEN }}
4545

4646
- uses: actions/setup-python@v5
4747
with:
@@ -112,11 +112,11 @@ jobs:
112112
- name: Open PR against TechAPI
113113
if: steps.changes.outputs.has_changes == 'true'
114114
env:
115-
GH_TOKEN: ${{ secrets.TECHAPI_PR_TOKEN }}
115+
GH_TOKEN: ${{ secrets.TECHAPI_TOKEN }}
116116
run: |
117117
set -euo pipefail
118118
if [ -z "${GH_TOKEN:-}" ]; then
119-
echo "::warning::Ingest produced additions but TECHAPI_PR_TOKEN is unset; skipping PR. Summary attached as artifact."
119+
echo "::warning::Ingest produced additions but TECHAPI_TOKEN is unset; skipping PR. Summary attached as artifact."
120120
exit 0
121121
fi
122122
cd TechAPI

0 commit comments

Comments
 (0)