Skip to content

Commit 05912fa

Browse files
fix image update logic in pipeline
1 parent 56df918 commit 05912fa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/devsecops-ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,17 @@ jobs:
192192
needs: docker
193193
permissions:
194194
contents: write # required to push commit
195+
env:
196+
REGISTRY: ghcr.io
197+
IMAGE_NAME: ${{ github.repository }}
195198
steps:
196199
- name: Checkout repository
197200
uses: actions/checkout@v4
198201

199202
# Update image tag in deployment.yaml
200203
- name: Update image tag
201204
run: |
202-
sed -i "s|image: .*tic-tac-toe-app:.*|image: ghcr.io/atkaridarshan04/tic-tac-toe-app:${{ needs.docker.outputs.image_tag }}|" kubernetes/deployment.yaml
205+
sed -i "s|image: ${REGISTRY}/${IMAGE_NAME}:.*|image: ${REGISTRY}/${IMAGE_NAME}:${{ needs.docker.outputs.image_tag }}|" kubernetes/deployment.yaml
203206
204207
# Commit and push change
205208
- name: Commit and push changes

0 commit comments

Comments
 (0)