From 2a4f6ecc4289ed8158910c262728cba55fc853d5 Mon Sep 17 00:00:00 2001 From: Vasil Khramov Date: Thu, 19 May 2022 00:10:16 +0300 Subject: [PATCH 1/3] IMP-31: add tag for epic branches --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 1dce9c6..800b73e 100644 --- a/action.yml +++ b/action.yml @@ -47,6 +47,7 @@ runs: images: ${{ inputs.docker-registry }}/${{ github.repository }} tags: | type=sha + type=ref,event=branch,enable=${{ contains(github.ref_name, 'epic') }} - name: 🚀 Build and push Docker image uses: docker/build-push-action@v2 From 3f5516a40fa1340e22e06cca9f7480060239587a Mon Sep 17 00:00:00 2001 From: Vasil Khramov Date: Thu, 19 May 2022 16:00:49 +0300 Subject: [PATCH 2/3] IMP-31: use different tags for basic and epic branches --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 800b73e..3b74e6f 100644 --- a/action.yml +++ b/action.yml @@ -46,8 +46,8 @@ runs: with: images: ${{ inputs.docker-registry }}/${{ github.repository }} tags: | - type=sha - type=ref,event=branch,enable=${{ contains(github.ref_name, 'epic') }} + type=sha,enable=${{ !contains(github.ref_name, 'epic') }} + type=raw,value=sha-{{ sha }}-{{ branch }},enable=${{ contains(github.ref_name, 'epic') }} - name: 🚀 Build and push Docker image uses: docker/build-push-action@v2 From f22a7c6b67b7779a3a3a6b03aad74d06513f7eae Mon Sep 17 00:00:00 2001 From: Vasil Khramov Date: Mon, 23 May 2022 17:20:30 +0300 Subject: [PATCH 3/3] IMP-31: use startsWith --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 3b74e6f..2241de1 100644 --- a/action.yml +++ b/action.yml @@ -46,8 +46,8 @@ runs: with: images: ${{ inputs.docker-registry }}/${{ github.repository }} tags: | - type=sha,enable=${{ !contains(github.ref_name, 'epic') }} - type=raw,value=sha-{{ sha }}-{{ branch }},enable=${{ contains(github.ref_name, 'epic') }} + type=sha,enable=${{ !startsWith(github.ref_name, 'epic') }} + type=raw,value=sha-{{ sha }}-{{ branch }},enable=${{ startsWith(github.ref_name, 'epic') }} - name: 🚀 Build and push Docker image uses: docker/build-push-action@v2