创建
Some checks failed
构建并运行 Docker / build (push) Failing after 5m1s

This commit is contained in:
2025-07-29 13:52:36 +08:00
parent 64a947f435
commit e6fa94efa0
7 changed files with 160 additions and 5 deletions

View File

@ -0,0 +1,31 @@
name: 构建并运行 Docker
on:
push:
tags:
- 'v*' # 只在以 build-v 开头的 tag如 build-v1.0.0)时触发
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 释放内存
run: docker system prune -a -f
- name: 拉取自定义 checkout action
run: git clone http://114.67.155.184:3000//niyyzf/checkout.git ./.actions/checkout
- name: 检出代码
uses: ./.actions/checkout
with:
fetch-depth: 1
persist-credentials: false
max-attempts: 5
- name: 构建 Docker 镜像
run: docker build -t watch-stock-list:latest .
- name: 启动/重启服务Docker Compose
run: |
docker compose down || true
docker compose up -d --force-recreate