From 7d3dab997164e39f6993c21be3510a0839ed1210 Mon Sep 17 00:00:00 2001 From: suncheng Date: Wed, 5 Mar 2025 18:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/push.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/push.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/push.yml b/.gitea/workflows/push.yml index 16220fd..9b51964 100644 --- a/.gitea/workflows/push.yml +++ b/.gitea/workflows/push.yml @@ -10,10 +10,10 @@ env: # 全局环境变量 jobs: build: name: Build Docker Image - runs-on: self-hosted # 必须与 runner 的标签匹配 (如 GITEA_RUNNER_LABELS: "docker") + runs-on: ubuntu-latest # 必须与 runner 的标签匹配 (如 GITEA_RUNNER_LABELS: "docker") steps: - name: Checkout code # ✅ 必须添加代码检出 - uses: actions/checkout@v3 + uses: addnab/docker-run-action@v3 - name: Cleanup old containers run: | @@ -25,7 +25,7 @@ jobs: deploy: name: Deploy to Production - runs-on: self-hosted + runs-on: ubuntu-22.04 needs: build # ⚠️ 确保在 build 任务完成后执行 environment: production # 需要先在 Gitea 仓库设置中创建环境 steps: @@ -33,5 +33,4 @@ jobs: uses: actions/checkout@v3 - name: Start containers - run: - docker compose -p $COMPOSE_PROJECT_NAME up -d + run: docker compose -p $COMPOSE_PROJECT_NAME up -d