Skip to content

Commit 5d32e75

Browse files
committed
fix: fix create tags workflow
1 parent 447f45b commit 5d32e75

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/shared-create-tags.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ jobs:
1717
steps:
1818
- name: Checkout repository
1919
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
20+
with:
21+
fetch-depth: 0
2022

2123
- name: Create or move tags and push
2224
run: |
2325
git config --local user.email "github-actions[bot]@users.noreply.github.com"
2426
git config --local user.name "github-actions[bot]"
2527
28+
# Handle both pull request and push events
29+
COMMIT_HASH="${{ github.event.pull_request.head.sha || github.sha }}
30+
git checkout $COMMIT_HASH
31+
2632
# Parse JSON array of tags
2733
TAGS='${{ inputs.tags }}'
2834
echo "Creating tags: $TAGS"

0 commit comments

Comments
 (0)