Skip to content

Commit b96be6f

Browse files
Update GitHub Actions workflow to set GITHUB_TOKEN and modify git remote URL
1 parent e14e5ec commit b96be6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/kustomize-ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,15 @@ jobs:
6868
sed -i.bak -E "s|image:.*|image: ${IMAGE_NAME}:${IMAGE_TAG}|" "$FILE"
6969
7070
- name: Commit and push changes
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GIT_PAT }}
7173
run: |
7274
git config --global user.name ${{ secrets.GIT_USER_EMAIL }}
7375
git config --global user.email ${{ secrets.GIT_USER_NAME }}
7476
77+
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}.git
78+
79+
7580
git add kustomize/overlays/dev/patch-deployment-image.yaml
7681
git commit -m "Update latest image tag to $IMAGE_TAG"
7782
git push

0 commit comments

Comments
 (0)