From 82174e359afb4978c1afafcb7444d04076ab16c8 Mon Sep 17 00:00:00 2001 From: Nikita Kalyanov Date: Wed, 24 May 2023 18:55:47 +0300 Subject: [PATCH] don't push latest tags on release branch before this change we pushed latest tag both on main and on release. This could lead to akward situations when you start using some freshly merged to main feature and then the release happens and you start getting older image. It's possible to bump into this both locally and in cloud CI. The proposal is to only push latest on main. This is unlikely to cause issues because now if someone merges after the release latest is agin at main. However, the tag is more consistent and not depend on timing of merges --- .github/workflows/build_and_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 845a21ad0e..fb78ab9983 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -872,7 +872,7 @@ jobs: - name: Add latest tag to images if: | - (github.ref_name == 'main' || github.ref_name == 'release') && + github.ref_name == 'main' && github.event_name != 'workflow_dispatch' run: | crane tag 369495373322.dkr.ecr.eu-central-1.amazonaws.com/neon:${{needs.tag.outputs.build-tag}} latest @@ -884,7 +884,7 @@ jobs: - name: Push images to production ECR if: | - (github.ref_name == 'main' || github.ref_name == 'release') && + github.ref_name == 'main' && github.event_name != 'workflow_dispatch' run: | crane copy 369495373322.dkr.ecr.eu-central-1.amazonaws.com/neon:${{needs.tag.outputs.build-tag}} 093970136003.dkr.ecr.eu-central-1.amazonaws.com/neon:latest @@ -907,7 +907,7 @@ jobs: - name: Push latest tags to Docker Hub if: | - (github.ref_name == 'main' || github.ref_name == 'release') && + github.ref_name == 'main' && github.event_name != 'workflow_dispatch' run: | crane tag neondatabase/neon:${{needs.tag.outputs.build-tag}} latest