Skip to content

Commit a4df9fd

Browse files
authored
Modify update-jaeger-version workflow for authentication
Updated the workflow to overwrite the 'origin' remote URL with a personal access token for persistent authentication during the runner's session. Signed-off-by: Yuri Shkuro <[email protected]>
1 parent f089151 commit a4df9fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/update-jaeger-version.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
git config user.name "jaegertracingbot"
3636
git config user.email "[email protected]"
3737
38+
# Overwrite the 'origin' remote URL to include the PAT and use the x-access-token placeholder.
39+
# This ensures the authentication is persistent for the runner's session.
40+
git remote set-url origin https://x-access-token:${{ secrets.JAEGERTRACINGBOT_PAT }}@github.com/${{ github.repository }}
41+
3842
- name: 📝 Commit changes
3943
if: ${{ steps.check_version.outputs.update_needed == 'true' && env.DRY_RUN != 'true' }}
4044
id: commit
@@ -60,7 +64,7 @@ jobs:
6064
- name: 🚀 Push new branch
6165
if: ${{ steps.commit.outputs.pr_needed == 'true' && env.DRY_RUN != 'true' }}
6266
run: |
63-
git push https://x-access-token:${{ secrets.JAEGERTRACINGBOT_PAT }}@github.com/${{ github.repository }} HEAD:${{ steps.commit.outputs.branch_name }}
67+
git push origin HEAD:${{ steps.commit.outputs.branch_name }}
6468
6569
- name: ✨ Create Pull Request
6670
if: ${{ steps.commit.outputs.pr_needed == 'true' && env.DRY_RUN != 'true' }}

0 commit comments

Comments
 (0)