From 5968d95d5987486a7f6d73bb14bd6883e9265b26 Mon Sep 17 00:00:00 2001 From: gowtham1729 Date: Fri, 3 Nov 2023 15:43:24 +0900 Subject: [PATCH] feat: Add image tag update --- .github/workflows/build-backend.yml | 11 +++++++++++ infrastructure/k8s/folio-feed-helm/values.yaml | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-backend.yml b/.github/workflows/build-backend.yml index 9831bb2..5b10077 100644 --- a/.github/workflows/build-backend.yml +++ b/.github/workflows/build-backend.yml @@ -42,3 +42,14 @@ jobs: # Push the Docker image to Google Artifact Registry - name: Publish run: task push-backend-image tag="$GITHUB_SHA" + + - name: Replace Backend Image Tag + run: sed -i "s/\(&backendImageTag\) [^[:space:]]*/\1 $GITHUB_SHA/g" infrastructure/k8s/folio-feed-helm/values.yaml + + - name: Commit the Changes + run: | + git config user.name "Github Actions" + git config user.email github-actions@github.com + git add infrastructure/k8s/folio-feed-helm/values.yaml + git commit -m "backend image update: $GITHUB_SHA" + git push origin main diff --git a/infrastructure/k8s/folio-feed-helm/values.yaml b/infrastructure/k8s/folio-feed-helm/values.yaml index 360da08..65a86ab 100644 --- a/infrastructure/k8s/folio-feed-helm/values.yaml +++ b/infrastructure/k8s/folio-feed-helm/values.yaml @@ -4,7 +4,7 @@ backend: image: registry: us-central1-docker.pkg.dev/folio-feed-403709/image-registry repository: folio-feed-backend - tag: v1.4.1 + tag: v1.4.1 &backendImageTag replicaCount: 1 autoscaling: @@ -26,7 +26,7 @@ frontend: image: registry: us-central1-docker.pkg.dev/folio-feed-403709/image-registry repository: folio-feed-frontend - tag: v1.0.0 + tag: v1.0.0 &frontendImageTag replicaCount: 1 autoscaling: