mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-29 02:07:33 +00:00
build: use raw instead of match for stable tag metadata (#2251)
This commit is contained in:
@@ -125,16 +125,16 @@ jobs:
|
|||||||
type=ref,event=tag,enable=${{ matrix.variant == env.MAIN_VARIANT }}
|
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
|
# 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 }}
|
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
|
# for building test/* branch images
|
||||||
type=ref,event=branch,suffix=-${{ 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=${{ matrix.variant }},enable=${{ github.ref_name == 'master' }}
|
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
|
# NOTE this identifies which variant will be published as "latest", which isn't
|
||||||
# necessarily the newest version of Java
|
# necessarily the newest version of Java
|
||||||
flavor: |
|
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: |
|
labels: |
|
||||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ jobs:
|
|||||||
push: >
|
push: >
|
||||||
${{
|
${{
|
||||||
github.ref_type == 'tag'
|
github.ref_type == 'tag'
|
||||||
|| github.ref_name == 'master'
|
|| github.ref_name == github.event.repository.default_branch
|
||||||
|| startsWith(github.ref_name, 'test/')
|
|| startsWith(github.ref_name, 'test/')
|
||||||
|| ( github.event_name == 'pull_request'
|
|| ( github.event_name == 'pull_request'
|
||||||
&& env.HAS_IMAGE_REPO_ACCESS
|
&& env.HAS_IMAGE_REPO_ACCESS
|
||||||
|
|||||||
Reference in New Issue
Block a user