Skip to content

Commit a93f974

Browse files
authored
fix(ci): use PAT_TOKEN for tag push in release workflow (#193)
The 'Create and push tag' step used the default GITHUB_TOKEN from actions/checkout, which lacks push permission. This caused a 403 error when the workflow_dispatch trigger attempted to create and push a tag. Use the PAT_TOKEN secret (already used for the changelog commit) to authenticate the tag push. Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>
1 parent 1764b64 commit a93f974

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
run: |
5757
git config user.name "github-actions[bot]"
5858
git config user.email "github-actions[bot]@users.noreply.github.com"
59+
git remote set-url origin "https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/${{ github.repository }}.git"
5960
git tag -a "${{ steps.version.outputs.tag }}" -m "Release ${{ steps.version.outputs.tag }}"
6061
git push origin "${{ steps.version.outputs.tag }}"
6162

0 commit comments

Comments
 (0)