3 Commits

Author SHA1 Message Date
3624aae550 测试 metadata_tags 2024-10-09 11:09:53 +08:00
f622e0b7fa 测试 metadata_tags 2024-10-09 11:07:08 +08:00
dfea1166e1 测试 ref_type 2024-10-09 11:04:22 +08:00
2 changed files with 2 additions and 3 deletions

View File

@ -37,13 +37,12 @@ jobs:
with:
build_file: ./docker-build-push/Dockerfile
build_platforms: linux/amd64
build_push: ${{ github.ref == 'refs/heads/main' }}
build_push: ${{ github.ref_type == 'tag' }}
build_load: true
metadata_images: |
docker.io/${{ vars.DOCKERHUB_USERNAME }}/docker-example
ghcr.io/${{ github.repository }}
metadata_tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}

View File

@ -42,7 +42,7 @@ runs:
id: meta
uses: docker/metadata-action@v5 # https://github.com/docker/metadata-action
with:
context: git
# context: git
# flavor
images: ${{ inputs.metadata_images }}
tags: ${{ inputs.metadata_tags }}