mirror of
https://github.com/yanhao98/docker-example.git
synced 2025-07-12 23:50:49 +08:00
新增 DOCKER_LATEST 环境变量并调整标签配置以支持动态版本管理
This commit is contained in:
@ -9,6 +9,7 @@ env:
|
||||
DOCKER_IMAGE_NAME: murielmay67761/docker-example
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
DOCKER_LATEST: latest
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
@ -46,7 +47,7 @@ jobs:
|
||||
images: |
|
||||
docker.io/${{ env.DOCKER_IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
type=raw,value=${{ env.DOCKER_LATEST }}
|
||||
type=semver,pattern={{major}}
|
||||
type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }}
|
||||
|
||||
|
Reference in New Issue
Block a user