File tree Expand file tree Collapse file tree 1 file changed +19
-10
lines changed
Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change 7171 - name : Checkout code
7272 uses : actions/checkout@v4
7373
74+ - name : Configure git
75+ run : |
76+ git config --global user.name "${{ secrets.GIT_USER_NAME }}"
77+ git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
78+
7479 - name : Update image tag in dev overlay
7580 run : |
7681 FILE="kustomize/overlays/dev/patch-deployment-image.yaml"
@@ -79,16 +84,20 @@ jobs:
7984
8085 sed -i.bak -E "s|image:.*|image: ${IMAGE_NAME}:${IMAGE_TAG}|" "$FILE"
8186
82- - name : Commit and push changes
83- run : |
84- git config --global user.name "${{ secrets.GIT_USER_NAME }}"
85- git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
87+ git add "$FILE"
88+ git commit -m "Update image tag to $IMAGE_TAG in kustomize overlay"
89+ git push origin HEAD:feature/kustomize-update
90+
91+ # - name: Commit and push changes
92+ # run: |
93+ # git config --global user.name "${{ secrets.GIT_USER_NAME }}"
94+ # git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
8695
8796
88- git remote set-url origin https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git
97+ # git remote set-url origin https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git
8998
90- git add kustomize/overlays/dev/patch-deployment-image.yaml
91- git commit -m "Update latest image tag to $IMAGE_TAG" || echo "No changes to commit"
92- git push
93- env :
94- IMAGE_TAG : ${{ github.sha }}
99+ # git add kustomize/overlays/dev/patch-deployment-image.yaml
100+ # git commit -m "Update latest image tag to $IMAGE_TAG" || echo "No changes to commit"
101+ # git push
102+ # env:
103+ # IMAGE_TAG: ${{ github.sha }}
You can’t perform that action at this time.
0 commit comments