Skip to content

Commit e91bf24

Browse files
ci: make playground-wasm lock push branch-aware
git push origin main was hardcoded, so a workflow_dispatch off a feature branch would fail at the final step (no local main ref). Push back to GITHUB_REF_NAME instead: identical on main, and pre-merge test runs bump the lock on their own branch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 5d0d5d2 commit e91bf24

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/playground-wasm.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
echo "$tag" > website/playground-wasm.lock
6262
6363
- name: Commit lock bump
64+
# Pushes back to the ref the workflow ran on: main for the normal
65+
# push-triggered flow, the dispatched branch for pre-merge test runs.
6466
run: |
6567
set -euo pipefail
6668
if git diff --quiet -- website/playground-wasm.lock; then
@@ -71,5 +73,5 @@ jobs:
7173
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
7274
git add website/playground-wasm.lock
7375
git commit -m "chore: bump playground wasm to $(cat website/playground-wasm.lock) [skip ci]"
74-
git pull --rebase origin main
75-
git push origin main
76+
git pull --rebase origin "$GITHUB_REF_NAME"
77+
git push origin "HEAD:$GITHUB_REF_NAME"

0 commit comments

Comments
 (0)