mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
feat(infrastructure): update
This commit is contained in:
6
.github/workflows/workflow.yml
vendored
6
.github/workflows/workflow.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Login to registry
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USER }}
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
@@ -31,7 +31,6 @@ jobs:
|
|||||||
tags: ${{ secrets.DOCKER_USER }}/cd-test:latest
|
tags: ${{ secrets.DOCKER_USER }}/cd-test:latest
|
||||||
|
|
||||||
- name: Get image digest
|
- name: Get image digest
|
||||||
# docker/build-push-action outputs `digest` automatically
|
|
||||||
run: echo "IMAGE_DIGEST=${{ steps.build.outputs.digest }}" >> $GITHUB_ENV
|
run: echo "IMAGE_DIGEST=${{ steps.build.outputs.digest }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Update manifest with new image digest
|
- name: Update manifest with new image digest
|
||||||
@@ -39,9 +38,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
valueFile: 'cd-test/guestbook-ui-deployment.yaml'
|
valueFile: 'cd-test/guestbook-ui-deployment.yaml'
|
||||||
propertyPath: 'spec.template.spec.containers[0].image'
|
propertyPath: 'spec.template.spec.containers[0].image'
|
||||||
# zapíšeme image s digestem
|
|
||||||
value: ${{ secrets.DOCKER_USER }}/cd-test@${{ env.IMAGE_DIGEST }}
|
value: ${{ secrets.DOCKER_USER }}/cd-test@${{ env.IMAGE_DIGEST }}
|
||||||
commitChange: true
|
commitChange: true
|
||||||
message: "Update image to digest ${{ env.IMAGE_DIGEST }}"
|
message: "Update image to digest ${{ env.IMAGE_DIGEST }}"
|
||||||
createPR: 'false'
|
createPR: 'false'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user