Skip to content

Commit 685d52a

Browse files
committed
Enhance GitHub Actions workflow to include permissions and update image tag push command
1 parent a51ba0d commit 685d52a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
name: Deploy to Kubernetes
2727
runs-on: ubuntu-latest
2828
environment: production
29+
permissions:
30+
contents: write # Allow writing to repository
31+
actions: read
2932

3033
steps:
3134
- name: Checkout Repository
@@ -77,4 +80,4 @@ jobs:
7780
git config --local user.name "GitHub Action"
7881
git add helm/values.yaml
7982
git commit -m "Update image tag to ${{ inputs.image-tag || github.sha }}" || exit 0
80-
git push
83+
git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git

0 commit comments

Comments
 (0)