瀏覽代碼

fix: another attempt at fixing tag docker builds

Jun Siang Cheah 11 月之前
父節點
當前提交
3176fe0c2b
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      .github/workflows/docker-build.yaml

+ 6 - 1
.github/workflows/docker-build.yaml

@@ -70,9 +70,10 @@ jobs:
           images: ${{ env.FULL_IMAGE_NAME }}
           tags: |
             type=ref,event=branch
-            type=ref,event=tag
+            ${{ github.ref_type == 'tag' && 'type=raw,value=main' || '' }}
           flavor: |
             prefix=cache-${{ matrix.platform }}-
+            latest=false
 
       - name: Build Docker image (latest)
         uses: docker/build-push-action@v5
@@ -159,8 +160,10 @@ jobs:
           images: ${{ env.FULL_IMAGE_NAME }}
           tags: |
             type=ref,event=branch
+            ${{ github.ref_type == 'tag' && 'type=raw,value=main' || '' }}
           flavor: |
             prefix=cache-cuda-${{ matrix.platform }}-
+            latest=false
 
       - name: Build Docker image (cuda)
         uses: docker/build-push-action@v5
@@ -248,8 +251,10 @@ jobs:
           images: ${{ env.FULL_IMAGE_NAME }}
           tags: |
             type=ref,event=branch
+            ${{ github.ref_type == 'tag' && 'type=raw,value=main' || '' }}
           flavor: |
             prefix=cache-ollama-${{ matrix.platform }}-
+            latest=false
 
       - name: Build Docker image (ollama)
         uses: docker/build-push-action@v5