Skip to content

Commit ff63436

Browse files
committed
Use RELEASE_PAT for checkout to ensure push authenticates as TEAM4-0
Copilot review: actions/checkout persists GITHUB_TOKEN credentials that would override a remote URL change. Passing token: RELEASE_PAT to the checkout step ensures the persisted credential is already the RELEASE_PAT, so the git push uses it without needing to modify the remote URL.
1 parent a58197f commit ff63436

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/cd_release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
uses: actions/checkout@v6
2828
with:
2929
fetch-depth: 0
30+
token: ${{ secrets.RELEASE_PAT }}
3031

3132
- name: Set up git config
3233
run: |
@@ -74,9 +75,7 @@ jobs:
7475
7576
- name: Update '${{ env.DEFAULT_REPO_BRANCH }}'
7677
if: steps.update_version_step.outputs.continue_workflow == 'true'
77-
run: |
78-
git remote set-url origin "https://TEAM4-0:${{ secrets.RELEASE_PAT }}@github.com/${{ github.repository }}.git"
79-
git push origin ${{ env.DEFAULT_REPO_BRANCH }}
78+
run: git push origin ${{ env.DEFAULT_REPO_BRANCH }}
8079

8180
publish_container_image:
8281
name: Publish Container image on GH Packages

0 commit comments

Comments
 (0)