Skip to content

Commit 713a8d1

Browse files
authored
fix(ci): checkout proper branch before committing in update-versions workflow (#100)
1 parent 8f6d583 commit 713a8d1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/update-versions.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
run: |
6464
git config --local user.email "github-actions[bot]@users.noreply.github.com"
6565
git config --local user.name "github-actions[bot]"
66+
# Checkout the proper branch (handle both PR and push events)
67+
BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
68+
git checkout "$BRANCH_NAME"
6669
git add packages/builder/src/export/versions.ts
6770
git commit -m "chore: update export versions"
68-
git push
71+
git push origin "$BRANCH_NAME"

0 commit comments

Comments
 (0)