From f53a7c2abdf2c64c57921e01ed407a80a1065ea6 Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Wed, 21 Aug 2024 09:29:06 -0500 Subject: [PATCH 01/12] fix: incorrect tags in build --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 669624aaa9..72f916aef6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,10 +34,10 @@ jobs: tags: | type=ref,event=pr type=ref,event=branch,branch=main,latest=true - type=ref,event=branch,branch=main + type=ref,event=branch,branch=main,tag=latest type=ref,event=branch,branch!=main - type=semver,pattern={{version}},branch=main,latest=false - type=ref,event=tag + type=semver,pattern={{version}},branch=main,latest=false,tag=stable + type=ref,event=tag,tag={{ tag }} - name: Show tags run: | From 4e3c9c150acc21c8e06f4d07026b47e03425e6ee Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Wed, 21 Aug 2024 10:00:54 -0500 Subject: [PATCH 02/12] fix: push must be included in slim --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 72f916aef6..ab67076e27 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -61,6 +61,7 @@ jobs: with: context: . file: ./Dockerfile.slim + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }}-slim labels: ${{ steps.meta.outputs.labels }} build-args: | From f87583ce5448b72ffffb4c2ec7d451d2aa0a672b Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Thu, 22 Aug 2024 11:43:42 -0500 Subject: [PATCH 03/12] fix: allow for latest and stable tags --- .github/workflows/build.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ab67076e27..addc8ccba8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,11 +33,8 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=pr - type=ref,event=branch,branch=main,latest=true type=ref,event=branch,branch=main,tag=latest - type=ref,event=branch,branch!=main - type=semver,pattern={{version}},branch=main,latest=false,tag=stable - type=ref,event=tag,tag={{ tag }} + type=ref,event=tag,tag=stable - name: Show tags run: | From bcf1507d8252da04bfb99c43eba4d64fa96e7107 Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Thu, 22 Aug 2024 11:52:50 -0500 Subject: [PATCH 04/12] feat: testing tags --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index addc8ccba8..91a36fdfe4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=pr + type=ref,event=pr,tag=test type=ref,event=branch,branch=main,tag=latest type=ref,event=tag,tag=stable From 8f06e7f90f419180152a2d1acc0dd898f9add3c2 Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Thu, 22 Aug 2024 12:04:36 -0500 Subject: [PATCH 05/12] feat: try pattern --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 91a36fdfe4..7afbef5e9f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=pr,tag=test + type=ref,event=pr,pattern=test type=ref,event=branch,branch=main,tag=latest type=ref,event=tag,tag=stable From 6507a96eb3dc0589fef4e165562d1289488900bd Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Thu, 22 Aug 2024 12:14:54 -0500 Subject: [PATCH 06/12] fix: try value key --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7afbef5e9f..c563577a69 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=pr,pattern=test + type=ref,event=pr,value=test type=ref,event=branch,branch=main,tag=latest type=ref,event=tag,tag=stable From 13b25a06202ce170a121e16aea905bc97a6f6164 Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Thu, 22 Aug 2024 12:31:56 -0500 Subject: [PATCH 07/12] fix: try raw --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c563577a69..3b9c789a3e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,9 +32,9 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=pr,value=test - type=ref,event=branch,branch=main,tag=latest - type=ref,event=tag,tag=stable + type=raw,value=testing + type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=stable,enable={{tag}} - name: Show tags run: | From edfb4ce1f851ce7ec4437555edb81baa371ed1e4 Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Thu, 22 Aug 2024 14:34:25 -0500 Subject: [PATCH 08/12] fix: build yaml --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3b9c789a3e..e980d368ff 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,9 +32,10 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=testing type=raw,value=latest,enable={{is_default_branch}} type=raw,value=stable,enable={{tag}} + type=ref,event=tag + type=ref,event=pr - name: Show tags run: | From 49feee8ff49769731d24107c7fddafbab7f8ce38 Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Thu, 22 Aug 2024 14:39:12 -0500 Subject: [PATCH 09/12] fix: broken build file --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e980d368ff..92c3d299da 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,8 +32,8 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=latest,enable={{is_default_branch}} - type=raw,value=stable,enable={{tag}} + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/') }} type=ref,event=tag type=ref,event=pr From 95cf74d6fa5385539bdcda77bdece4fd45092380 Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Thu, 22 Aug 2024 14:46:39 -0500 Subject: [PATCH 10/12] fix: try a raw value to confirm --- .github/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 92c3d299da..de0a88f6a7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,10 +32,9 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | + type=raw,value=latest type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/') }} - type=ref,event=tag - type=ref,event=pr - name: Show tags run: | From b9f66e19e041c03bc1aad2fec0728a1f781dceae Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Thu, 22 Aug 2024 14:51:37 -0500 Subject: [PATCH 11/12] feat: latest and stable releases --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index de0a88f6a7..a4bf33f9cb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,9 +32,9 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=latest type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/') }} + type=ref,event=pr - name: Show tags run: | From 425bd4303d64783679e85a3df4777680fa3f90af Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Fri, 23 Aug 2024 12:16:15 -0500 Subject: [PATCH 12/12] feat: add tagged version as well --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a4bf33f9cb..9dca727dfd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,6 +33,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=ref,event=tag type=raw,value=stable,enable=${{ startsWith(github.ref, 'refs/tags/') }} type=ref,event=pr