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