更新docker-push与github action,防止提交覆盖docker hub版本

This commit is contained in:
yyhuni
2025-12-15 12:18:22 +08:00
parent 0ffab3958d
commit 04f320f823
2 changed files with 15 additions and 7 deletions

View File

@@ -2,12 +2,8 @@ name: Build and Push Docker Images
on:
push:
branches: [main]
paths:
- 'backend/**'
- 'frontend/**'
- 'docker/**'
- '.github/workflows/**'
tags:
- 'v*' # 只在推送 v 开头的 tag 时触发(如 v1.0.0
workflow_dispatch: # 手动触发
# 并发控制:同一分支只保留最新的构建,取消之前正在运行的