From 8dcd175e55086d9e5ce4c012ec2d1d677bae03d6 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 09:46:49 +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 | 8 +++++--- docker-build-push/action.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed83716..ccf7076 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,10 +30,12 @@ jobs: metadata_images: | docker.io/murielmay67761/docker-example # metadata_tags: | - # type=raw,value=latest + # 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 - name: Check Docker image run: | set -x; - # docker run --rm image-test:latest whoami - # docker images; + docker images; docker run --rm ${{ steps.docker-build-push.outputs.imageid }} whoami diff --git a/docker-build-push/action.yml b/docker-build-push/action.yml index 5be0154..57e0aa0 100644 --- a/docker-build-push/action.yml +++ b/docker-build-push/action.yml @@ -50,7 +50,7 @@ runs: show-progress: false - name: Extract metadata id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v5 # https://github.com/docker/metadata-action with: images: ${{ inputs.metadata_images }} tags: ${{ inputs.metadata_tags }}