HouYunFei Codex commited on
Commit
9d13cce
·
1 Parent(s): 6b31eec

Publish Docker image only on tags

Browse files

Co-Authored-By: Codex <noreply@openai.com>

.github/workflows/docker-publish.yml CHANGED
@@ -2,8 +2,6 @@ name: Publish Docker Image
2
 
3
  on:
4
  push:
5
- branches:
6
- - main
7
  tags:
8
  - "v*"
9
  workflow_dispatch:
@@ -43,8 +41,7 @@ jobs:
43
  with:
44
  images: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
45
  tags: |
46
- type=raw,value=latest,enable={{is_default_branch}}
47
- type=ref,event=branch
48
  type=ref,event=tag
49
  type=sha
50
  type=semver,pattern={{version}}
 
2
 
3
  on:
4
  push:
 
 
5
  tags:
6
  - "v*"
7
  workflow_dispatch:
 
41
  with:
42
  images: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
43
  tags: |
44
+ type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
 
45
  type=ref,event=tag
46
  type=sha
47
  type=semver,pattern={{version}}