From 8cd21c914ff7a1a11bd2617616a3a883e5a265f5 Mon Sep 17 00:00:00 2001 From: Sebastian Szeszko Date: Tue, 3 Feb 2026 08:04:21 +0100 Subject: [PATCH 1/4] WIP --- .github/workflows/ci-cd-typescript.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-cd-typescript.yml b/.github/workflows/ci-cd-typescript.yml index 3849a80..f98f7ad 100644 --- a/.github/workflows/ci-cd-typescript.yml +++ b/.github/workflows/ci-cd-typescript.yml @@ -69,16 +69,17 @@ jobs: - name: Check if perform release id: perform_release run: | - if [[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == "refs/heads/develop" || "${GITHUB_REF}" == "refs/heads/aks-dev" ]]; then - echo "PERFORM_RELEASE=true" >> $GITHUB_ENV + if [[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == "refs/heads/development" || "${GITHUB_REF}" == "refs/heads/aks-dev" ]]; then + PERFORM_RELEASE=true elif [[ "${GITHUB_EVENT_NAME}" == "push" && ( "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == refs/tags/* ) ]]; then - echo "PERFORM_RELEASE=true" >> $GITHUB_ENV + PERFORM_RELEASE=true elif [[ "${{ inputs.performRelease }}" == "true" ]]; then - echo "PERFORM_RELEASE=true" >> $GITHUB_ENV + PERFORM_RELEASE=true else - echo "PERFORM_RELEASE=false" >> $GITHUB_ENV + PERFORM_RELEASE=false fi - echo "Perform release condition: PERFORM_RELEASE" + echo "PERFORM_RELEASE=$PERFORM_RELEASE" >> $GITHUB_ENV + echo "Perform release: $PERFORM_RELEASE" - name: Lowercase Docker Image Name run: | @@ -90,7 +91,8 @@ jobs: with: images: ${{ env.IMAGE_NAME }} tags: | - type=edge,branch=main + type=raw,value=main,enable={{is_default_branch}} + type=raw,value=dev,enable=${{ github.ref == 'refs/heads/development' }} type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} @@ -120,6 +122,12 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Debug metadata outputs + if: env.PERFORM_RELEASE == 'true' + run: | + echo "Meta tags: ${{ steps.meta.outputs.tags }}" + echo "Meta labels: ${{ steps.meta.outputs.labels }}" + echo "IMAGE_NAME: ${{ env.IMAGE_NAME }}" - name: Build and push if: env.PERFORM_RELEASE == 'true' @@ -128,5 +136,5 @@ jobs: context: . push: true target: "${{ env.PRODUCTION_STAGE }}" - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 43cf601d6b4494a63fe37c6fda4b843b71b378ff Mon Sep 17 00:00:00 2001 From: Avi Date: Tue, 3 Feb 2026 13:44:52 +0100 Subject: [PATCH 2/4] Update release condition checks in CI/CD workflow --- .github/workflows/ci-cd-typescript.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-typescript.yml b/.github/workflows/ci-cd-typescript.yml index f98f7ad..d0c190b 100644 --- a/.github/workflows/ci-cd-typescript.yml +++ b/.github/workflows/ci-cd-typescript.yml @@ -69,7 +69,9 @@ jobs: - name: Check if perform release id: perform_release run: | - if [[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == "refs/heads/development" || "${GITHUB_REF}" == "refs/heads/aks-dev" ]]; then + run: | + run: | + if [[ "${{ github.ref_name }}" == "${{ github.event.repository.default_branch }}" || "${{ github.ref_name }}" == "development" || "${{ github.ref_name }}" == "aks-dev" ]]; then PERFORM_RELEASE=true elif [[ "${GITHUB_EVENT_NAME}" == "push" && ( "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == refs/tags/* ) ]]; then PERFORM_RELEASE=true From 381d8daa88df7f79807c7ccaa2e64ed3ee5ef93b Mon Sep 17 00:00:00 2001 From: Avi Date: Tue, 3 Feb 2026 13:45:20 +0100 Subject: [PATCH 3/4] Update ci-cd-typescript.yml --- .github/workflows/ci-cd-typescript.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-cd-typescript.yml b/.github/workflows/ci-cd-typescript.yml index d0c190b..7fe1e34 100644 --- a/.github/workflows/ci-cd-typescript.yml +++ b/.github/workflows/ci-cd-typescript.yml @@ -69,8 +69,6 @@ jobs: - name: Check if perform release id: perform_release run: | - run: | - run: | if [[ "${{ github.ref_name }}" == "${{ github.event.repository.default_branch }}" || "${{ github.ref_name }}" == "development" || "${{ github.ref_name }}" == "aks-dev" ]]; then PERFORM_RELEASE=true elif [[ "${GITHUB_EVENT_NAME}" == "push" && ( "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == refs/tags/* ) ]]; then From a7895e4cc75a339cfbccae49d9f2310aaa35be0a Mon Sep 17 00:00:00 2001 From: Avi Date: Tue, 3 Feb 2026 13:47:09 +0100 Subject: [PATCH 4/4] Change CI/CD tag from 'main' to 'prod' --- .github/workflows/ci-cd-typescript.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd-typescript.yml b/.github/workflows/ci-cd-typescript.yml index 7fe1e34..a4afe23 100644 --- a/.github/workflows/ci-cd-typescript.yml +++ b/.github/workflows/ci-cd-typescript.yml @@ -91,7 +91,7 @@ jobs: with: images: ${{ env.IMAGE_NAME }} tags: | - type=raw,value=main,enable={{is_default_branch}} + type=raw,value=prod,enable={{is_default_branch}} type=raw,value=dev,enable=${{ github.ref == 'refs/heads/development' }} type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}}