From a54d74ae3b874a746bc8dc1f38a8d81aa9053b87 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 10 Oct 2023 13:18:30 +0200 Subject: [PATCH] ci(images-tags): use commit sha instead of branch name (#201) --- .github/workflows/pr.yml | 6 +++--- .github/workflows/test-on-kube.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index aa44cde3..1d6f4618 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -34,7 +34,7 @@ jobs: with: context: ./backend push: true - tags: ghcr.io/datalab-mi/basegun/basegun-backend:${{ github.head_ref }} + tags: ghcr.io/datalab-mi/basegun/basegun-backend:${{ github.sha }} target: dev build-frontend: @@ -54,7 +54,7 @@ jobs: with: context: ./frontend push: true - tags: ghcr.io/datalab-mi/basegun/basegun-frontend:${{ github.head_ref }} + tags: ghcr.io/datalab-mi/basegun/basegun-frontend:${{ github.sha }} target: prod test-backend: @@ -62,7 +62,7 @@ jobs: needs: build-backend runs-on: ubuntu-latest container: - image: ghcr.io/datalab-mi/basegun/basegun-backend:${{ github.head_ref }} + image: ghcr.io/datalab-mi/basegun/basegun-backend:${{ github.sha }} env: WORKSPACE: dev AWS_REGION: gra diff --git a/.github/workflows/test-on-kube.yml b/.github/workflows/test-on-kube.yml index 131920ca..c7dbbc80 100644 --- a/.github/workflows/test-on-kube.yml +++ b/.github/workflows/test-on-kube.yml @@ -48,9 +48,9 @@ jobs: --set ingress.hosts[0].paths[0].path="/" \ --set ingress.hosts[0].paths[0].pathType="Prefix" \ --set backend.image.repository="ghcr.io/datalab-mi/basegun/basegun-backend" \ - --set backend.image.tag="${{ github.head_ref }}" \ + --set backend.image.tag="${{ github.sha }}" \ --set frontend.image.repository="ghcr.io/datalab-mi/basegun/basegun-frontend" \ - --set frontend.image.tag="${{ github.head_ref }}" \ + --set frontend.image.tag="${{ github.sha }}" \ --set backend.secret.create="true" \ --set-string backend.secret.values.AWS_ACCESS_KEY_ID="${{ secrets.AWS_ACCESS_KEY_ID }}" \ --set-string backend.secret.values.AWS_SECRET_ACCESS_KEY="${{ secrets.AWS_SECRET_ACCESS_KEY }}" \