mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 23:20:56 +01:00
feat(infrastructure): add basic project deployment
This commit is contained in:
10
.github/workflows/workflow.yml
vendored
10
.github/workflows/workflow.yml
vendored
@@ -3,6 +3,8 @@ name: Build, Push and Update Image in Manifest
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'backend/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -26,9 +28,9 @@ jobs:
|
||||
id: build
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./cd-test
|
||||
context: ./backend
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_USER }}/cd-test:latest
|
||||
tags: ${{ secrets.DOCKER_USER }}/cc-app-demo:latest
|
||||
|
||||
- name: Get image digest
|
||||
run: echo "IMAGE_DIGEST=${{ steps.build.outputs.digest }}" >> $GITHUB_ENV
|
||||
@@ -36,9 +38,9 @@ jobs:
|
||||
- name: Update manifest with new image digest
|
||||
uses: OpsVerseIO/image-updater-action@0.1.0
|
||||
with:
|
||||
valueFile: 'cd-test/guestbook-ui-deployment.yaml'
|
||||
valueFile: 'deployment/guestbook-ui-deployment.yaml'
|
||||
propertyPath: 'spec.template.spec.containers[0].image'
|
||||
value: ${{ secrets.DOCKER_USER }}/cd-test@${{ env.IMAGE_DIGEST }}
|
||||
value: ${{ secrets.DOCKER_USER }}/cc-app-demo@${{ env.IMAGE_DIGEST }}
|
||||
commitChange: true
|
||||
message: "${{ github.event.head_commit.message }}"
|
||||
createPR: 'false'
|
||||
|
||||
Reference in New Issue
Block a user