From 405463f09521365ef433d5e2694ff3ca0f40f9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= <37316281+yanhao98@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=20metadata=5Ftags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d7b59d..375add4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,16 +37,16 @@ jobs: with: build_file: ./docker-build-push/Dockerfile build_platforms: linux/amd64 - build_push: false + build_push: ${{ github.ref == 'refs/heads/main' }} build_load: true metadata_images: | docker.io/${{ vars.DOCKERHUB_USERNAME }}/docker-example ghcr.io/${{ github.repository }} - # metadata_tags: | - # type=schedule,pattern=nightly,enable=true,priority=1000 - # type=ref,event=branch,enable=true,priority=600 - # type=ref,event=tag,enable=true,priority=600 - # type=ref,event=pr,prefix=pr-,enable=true,priority=600 + metadata_tags: | + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} + type=ref,event=tag,enable=true,priority=600 + type=semver,pattern={{version}} + type=semver,pattern={{major}} - name: Check Docker image run: | set -x;