Fix docker workflow tag issue

This commit is contained in:
2026-04-27 10:44:47 +08:00
parent 945df849f8
commit 68feea7611
+3 -3
View File
@@ -7,7 +7,7 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: cmakecpp/sale
jobs:
build-and-push:
@@ -37,7 +37,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=sha,prefix=
type=sha
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push image
@@ -46,7 +46,7 @@ jobs:
context: .
file: ./backend/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max