Skip to content

Commit c3df2f1

Browse files
committed
ci(engine): push pinned engine tag into bar-lobby on each build
After publishing the engine release, a new bump-lobby job checks out ExaDev/bar-lobby via the LOBBY_DEPLOY_KEY deploy key and writes the new tag to buildResources/engine-release.txt. That push triggers bar-lobby's release, propagating the engine without a PAT (deploy keys are git-only; a deploy-key push, unlike GITHUB_TOKEN, spawns the downstream run).
1 parent f0e9f27 commit c3df2f1

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/macos-build-gpu.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
build-macos-gpu:
5151
name: Build macOS arm64 engine (GPU)
5252
runs-on: macos-26
53+
outputs:
54+
engine_tag: ${{ steps.publish.outputs.tag }}
5355

5456
steps:
5557
- name: Checkout engine
@@ -354,13 +356,15 @@ jobs:
354356
# engine as a public release asset (token-free) instead of a cross-repo
355357
# artifact (which needs a PAT). Tag is monotonic (run number) + sha.
356358
- name: Publish engine release
359+
id: publish
357360
if: github.event_name == 'push'
358361
env:
359362
GH_TOKEN: ${{ github.token }}
360363
run: |
361364
set -euo pipefail
362365
SHORT_SHA="$(echo "$GITHUB_SHA" | cut -c1-7)"
363366
TAG="engine-macos-arm64-${GITHUB_RUN_NUMBER}-g${SHORT_SHA}"
367+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
364368
NOTES="Self-contained Apple Silicon engine (Mesa 26.2 KosmicKrisp GPU) for bar-lobby. Built from ${GITHUB_SHA} on ${GITHUB_REF_NAME}."
365369
TITLE="macOS arm64 engine — run ${GITHUB_RUN_NUMBER} (${SHORT_SHA})"
366370
# Idempotent: create the release, or (on a re-run with the same tag)
@@ -372,3 +376,35 @@ jobs:
372376
--repo "$GITHUB_REPOSITORY" --target "$GITHUB_SHA" \
373377
--title "$TITLE" --notes "$NOTES" --latest
374378
fi
379+
380+
# Propagate the engine to the lobby. A deploy key is git/SSH-only (it cannot
381+
# call the API for repository_dispatch), so instead we push the new engine tag
382+
# into a tracked file in ExaDev/bar-lobby. bar-lobby's release.yml triggers on
383+
# push to macos-port and reads that file, so this both pins the lobby to an
384+
# explicit engine version (reproducible — no "latest" race) and kicks a lobby
385+
# rebuild. A deploy-key push (unlike a GITHUB_TOKEN push) does spawn the
386+
# downstream workflow run.
387+
bump-lobby:
388+
name: Pin engine in bar-lobby
389+
needs: build-macos-gpu
390+
if: github.event_name == 'push' && needs.build-macos-gpu.outputs.engine_tag != ''
391+
runs-on: ubuntu-latest
392+
steps:
393+
- name: Checkout bar-lobby via SSH deploy key
394+
uses: actions/checkout@v6
395+
with:
396+
repository: ExaDev/bar-lobby
397+
ref: macos-port
398+
ssh-key: ${{ secrets.LOBBY_DEPLOY_KEY }}
399+
- name: Write pinned engine tag and push
400+
env:
401+
ENGINE_TAG: ${{ needs.build-macos-gpu.outputs.engine_tag }}
402+
run: |
403+
set -euo pipefail
404+
mkdir -p buildResources
405+
printf '%s\n' "$ENGINE_TAG" > buildResources/engine-release.txt
406+
git config user.name "github-actions[bot]"
407+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
408+
git add buildResources/engine-release.txt
409+
git diff --cached --quiet || git commit -m "chore: pin engine ${ENGINE_TAG}"
410+
git push

0 commit comments

Comments
 (0)