更新 .gitea/workflows/push.yml
This commit is contained in:
@@ -10,7 +10,7 @@ env: # 全局环境变量
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build Docker Image
|
name: Build Docker Image
|
||||||
runs-on: docker:docker # 必须与 runner 的标签匹配 (如 GITEA_RUNNER_LABELS: "docker")
|
runs-on: self-hosted # 必须与 runner 的标签匹配 (如 GITEA_RUNNER_LABELS: "docker")
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code # ✅ 必须添加代码检出
|
- name: Checkout code # ✅ 必须添加代码检出
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy to Production
|
name: Deploy to Production
|
||||||
runs-on: docker
|
runs-on: self-hosted
|
||||||
needs: build # ⚠️ 确保在 build 任务完成后执行
|
needs: build # ⚠️ 确保在 build 任务完成后执行
|
||||||
environment: production # 需要先在 Gitea 仓库设置中创建环境
|
environment: production # 需要先在 Gitea 仓库设置中创建环境
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user