This commit is contained in:
oiov
2025-06-03 14:47:18 +08:00
parent 938fcd4422
commit 06a70b6680
+5 -4
View File
@@ -4,8 +4,9 @@ on:
push:
branches:
- main
- fix/docker
tags:
- 'v*.*.*'
- "v*.*.*"
pull_request:
branches:
- main
@@ -47,7 +48,7 @@ jobs:
tags: |
type=sha,format=short
type=ref,event=branch,prefix=
type=ref,event=tag
type=ref,event=tag
# 构建并推送 Docker 镜像
- name: Build and push Docker image
@@ -55,10 +56,10 @@ jobs:
with:
context: .
file: ./Dockerfile
push: true # ${{ github.event_name != 'pull_request' }}
push: true # ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ENVIRONMENT=${{ github.event.inputs.environment || 'production' }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max