From 294191ecae08120e407f1a8b2c5dda12ffb7b007 Mon Sep 17 00:00:00 2001 From: Russell Troxel Date: Wed, 18 Oct 2023 03:48:20 -0700 Subject: [PATCH] Only set `latest` tag on version bump (#232) * Only set `latest` tag on version bump Signed-off-by: Russell Troxel * go mod tidy Signed-off-by: Russell Troxel --------- Signed-off-by: Russell Troxel --- .github/actions/docker-image/action.yaml | 7 ++++++- .github/workflows/on-merge.yml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/docker-image/action.yaml b/.github/actions/docker-image/action.yaml index c370a11..3b2b5cc 100644 --- a/.github/actions/docker-image/action.yaml +++ b/.github/actions/docker-image/action.yaml @@ -11,6 +11,11 @@ inputs: type: boolean required: false default: true + latest: + description: Update latest tag + type: boolean + required: false + default: true runs: using: composite @@ -21,7 +26,7 @@ runs: with: images: ghcr.io/${{ github.repository }} flavor: | - latest=true + latest=${{ fromJSON(inputs.latest) }} prefix=v tags: | type=ref,event=branch diff --git a/.github/workflows/on-merge.yml b/.github/workflows/on-merge.yml index 2db0c12..b335c16 100644 --- a/.github/workflows/on-merge.yml +++ b/.github/workflows/on-merge.yml @@ -26,3 +26,4 @@ jobs: uses: ./.github/actions/docker-image with: token: "${{ secrets.GITHUB_TOKEN }}" + latest: false