From 01f51d8b543bb4f1708a0f46272449be5e8e21aa Mon Sep 17 00:00:00 2001 From: Bret Fisher Date: Sun, 15 May 2022 14:42:34 -0400 Subject: [PATCH] add stable unique image tag --- .github/workflows/reusable-docker-build.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-docker-build.yaml b/.github/workflows/reusable-docker-build.yaml index 987fd7e..42723a9 100644 --- a/.github/workflows/reusable-docker-build.yaml +++ b/.github/workflows/reusable-docker-build.yaml @@ -55,14 +55,14 @@ on: tag-rules: # https://github.com/marketplace/actions/docker-metadata-action#tags-input description: Use docker-metadata action to create tags from a key-value pair list in CSV format - required: true + required: false type: string default: | - type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} - type=ref,event=pr - type=ref,event=branch - type=semver,pattern={{version}} - type=raw,value=gha-${{ github.run_id }} + type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} + type=raw,value=stable-{{date 'YYYYMMDDHHmmss'}},enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} + type=ref,event=pr + type=ref,event=branch + type=raw,value=gha-${{ github.run_id }} flavor-rules: # https://github.com/marketplace/actions/docker-metadata-action#flavor-input description: Three rules to (optionally) set for tag-rules, latest, prefix, and suffix @@ -202,4 +202,4 @@ jobs: id: ghcr-tag run: | echo '::echo::on' - echo "::set-output name=tag::gha-${{ github.run_id }}" \ No newline at end of file + echo "::set-output name=tag::gha-${{ github.run_id }}"