Files
watch-stock-list/.gitea/workflows/docker-build.yml
niyyzf cfdc5e5d9a
Some checks failed
构建并运行 Docker / build (push) Failing after 23s
增加构建缓存
2025-07-29 14:22:54 +08:00

34 lines
935 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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: 设置 Docker Buildx
run: docker buildx create --use
- 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 --cache-from type=gha --cache-to type=gha,mode=max -t watch-stock-list:latest .
- name: 启动/重启服务Docker Compose
run: |
docker compose down || true
docker compose up -d --force-recreate