@@ -45,32 +45,18 @@ jobs:
4545 username : ${{ github.actor }}
4646 password : ${{ secrets.GITHUB_TOKEN }}
4747
48- -
uses :
benjlevesque/[email protected] 49- id : short-sha
50- with :
51- length : 7
52-
5348 - name : Extract metadata (tags, labels) for Docker
5449 id : meta
5550 uses : docker/metadata-action@v5
51+ env :
52+ DOCKER_METADATA_SHORT_SHA_LENGTH : 7
5653 with :
5754 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5855 tags : |
59- # Tag with branch name for branch pushes
60- type=ref,event=branch
61- # Tag with PR number for pull requests
62- type=ref,event=pr
63- # Tag with git tag for version releases
64- type=semver,pattern={{version}}
65- type=semver,pattern={{major}}.{{minor}}
66- type=semver,pattern={{major}}
67- # # Tag with short SHA
68- # type=sha,format=short
69- # Tag latest only on main branch
56+ type=semver,pattern={{version}},value=p1/v1.0.0,match=v(\d.\d.\d)$,${{ startsWith(github.ref, 'refs/tags/v') }}
57+ type=sha
58+ type=schedule,pattern={{date 'YYYYMMDD'}}
7059 type=raw,value=latest,enable={{is_default_branch}}
71- # Tag with full git tag
72- type=raw,value={{tag}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
73- type=raw,value={{steps.short-sha.outputs.sha}},enable={{is_default_branch}}
7460 labels : |
7561 org.opencontainers.image.title=aigitcommit
7662 org.opencontainers.image.description=AI-powered Git commit message generator
0 commit comments