Skip to content

Commit dc44e9d

Browse files
committed
ci(GitHub): update import maps workflow to use correct branch reference for push and PR comment
1 parent 5af96a3 commit dc44e9d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/update-importmaps.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
with:
1616
token: ${{ secrets.GITHUB_TOKEN }}
1717
fetch-depth: 0
18+
ref: ${{ github.head_ref }}
1819
- name: Configure Git
1920
run: |
2021
git config user.name 'github-actions[bot]'
@@ -27,10 +28,10 @@ jobs:
2728
run: |
2829
git add -A
2930
git commit -m "chore(oversight): update import maps"
30-
git push
31+
git push origin HEAD:${{ github.head_ref }}
3132
- name: Update PR comment to include aem.live test URL
3233
run: |
3334
OLD_BODY=$(gh pr view --json body --jq ".body")
34-
BRANCH_NAME=$(echo ${{ github.ref }} | sed 's|refs/heads/||')
35+
BRANCH_NAME=$(echo ${{ github.head_ref }})
3536
NEW_BODY="$OLD_BODY\n\nTest at: https://$BRANCH_NAME--helix-website--adobe.aem.live/tools/oversight/explorer.html?domain=www.emigrationbrewing.com"
3637
gh pr edit ${{ github.event.number }} --body "$NEW_BODY"

0 commit comments

Comments
 (0)