From 17d1725fc866f587b35a4c0a2b375e90679ce921 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 23 Jun 2023 13:48:36 -0500 Subject: [PATCH] build: use raw instead of match for stable tag metadata --- .github/workflows/build-multiarch.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index a267bab282f..25dc3e08fe0 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -125,16 +125,16 @@ jobs: type=ref,event=tag,enable=${{ matrix.variant == env.MAIN_VARIANT }} # and each variant (including main one) gets the tag with the variant suffix, such as 2023.1.1-java17 type=ref,event=tag,suffix=-${{ matrix.variant }} - # latest repo tag gets a moving 'stable' image tag applied to the main variant - type=match,value=stable,enable=${{ matrix.variant == env.MAIN_VARIANT }},pattern=\d+\.\d+\.\d+ # for building test/* branch images - type=ref,event=branch,suffix=-${{ matrix.variant }},enable=${{ github.ref_name != 'master' }} - # - type=raw,value=${{ matrix.variant }},enable=${{ github.ref_name == 'master' }} + type=ref,event=branch,suffix=-${{ matrix.variant }},enable=${{ github.ref_name != github.event.repository.default_branch }} + # latest repo tag gets a moving 'stable' image tag applied to the main variant + type=raw,value=stable,enable=${{ github.ref_type == 'tag' && matrix.variant == env.MAIN_VARIANT }} + # apply the variant as a moving tag for most recent commit per variant + type=raw,value=${{ matrix.variant }},enable=${{ github.ref_name == github.event.repository.default_branch }} # NOTE this identifies which variant will be published as "latest", which isn't # necessarily the newest version of Java flavor: | - latest=${{ matrix.variant == env.MAIN_VARIANT && github.ref_name == 'master' }} + latest=${{ matrix.variant == env.MAIN_VARIANT && github.ref_name == github.event.repository.default_branch }} labels: | org.opencontainers.image.authors=Geoff Bourne @@ -191,7 +191,7 @@ jobs: push: > ${{ github.ref_type == 'tag' - || github.ref_name == 'master' + || github.ref_name == github.event.repository.default_branch || startsWith(github.ref_name, 'test/') || ( github.event_name == 'pull_request' && env.HAS_IMAGE_REPO_ACCESS