Skip to content

Commit cd2ccf6

Browse files
committed
@
ci: auto-bump TechEngine submodule via repository_dispatch Listens for repository_dispatch (event type: engine-updated) sent by TechEngine on every push to its main, then runs `git submodule update --remote TechEngine` and commits/pushes the new pointer to main. Keeps the TechEngine gitlink in sync with the engine automatically instead of requiring a manual bump. Also runnable via workflow_dispatch. @
1 parent 3245733 commit cd2ccf6

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/bump-engine.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: bump-engine
2+
3+
# Auto-bumps the TechEngine submodule pointer to its latest main commit.
4+
# Fired by TechEngine via repository_dispatch (event type: engine-updated) on
5+
# every push to TechEngine's main; also runnable manually. The submodule gitlink
6+
# lives in THIS repo, so the bump commit must be made here — TechEngine only
7+
# sends the signal (see .claude/techengine_submodule_sync_spec.md for the
8+
# TechEngine-side contract).
9+
on:
10+
repository_dispatch:
11+
types: [engine-updated]
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: write
16+
17+
concurrency:
18+
group: bump-engine
19+
cancel-in-progress: true
20+
21+
jobs:
22+
bump:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
submodules: true
28+
fetch-depth: 0
29+
30+
- name: Update TechEngine submodule to latest main
31+
id: bump
32+
run: |
33+
git submodule update --remote --recursive TechEngine
34+
if git diff --quiet -- TechEngine; then
35+
echo "changed=false" >> "$GITHUB_OUTPUT"
36+
echo "Submodule already up to date — nothing to do."
37+
else
38+
echo "changed=true" >> "$GITHUB_OUTPUT"
39+
fi
40+
41+
- name: Commit & push bump
42+
if: steps.bump.outputs.changed == 'true'
43+
run: |
44+
NEW_SHA=$(git -C TechEngine rev-parse --short HEAD)
45+
git config user.name "github-actions[bot]"
46+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
47+
git add TechEngine
48+
git commit -m "chore: bump TechEngine submodule to ${NEW_SHA}"
49+
git push

0 commit comments

Comments
 (0)