From 35f2f7ff8132736ecce4d9f05ddf2a061f7b35dd Mon Sep 17 00:00:00 2001 From: "kim.dev.6789" Date: Fri, 16 Jan 2026 10:41:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=90=8C=E6=AD=A5=20workflow?= =?UTF-8?q?=20=E4=B8=8D=E8=A6=86=E7=9B=96=E7=8E=B0=E6=9C=89=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/itom-platform-auto-build.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/itom-platform-auto-build.yml b/.gitea/workflows/itom-platform-auto-build.yml index 5c23026..45baf6f 100644 --- a/.gitea/workflows/itom-platform-auto-build.yml +++ b/.gitea/workflows/itom-platform-auto-build.yml @@ -10,12 +10,16 @@ permissions: contents: read packages: write +env: + # CI 触发模式:优先仓库变量,其次 Secrets(默认 dispatch) + CI_TRIGGER_MODE: ${{ vars.CI_TRIGGER_MODE || secrets.CI_TRIGGER_MODE || 'dispatch' }} + jobs: build: - # 触发开关:仓库变量 CI_TRIGGER_MODE=dispatch|push|both(默认 dispatch) + # 触发开关:CI_TRIGGER_MODE=dispatch|push|both if: | - (github.event_name == 'workflow_dispatch' && (vars.CI_TRIGGER_MODE == '' || vars.CI_TRIGGER_MODE == 'dispatch' || vars.CI_TRIGGER_MODE == 'both')) || - (github.event_name == 'push' && (vars.CI_TRIGGER_MODE == 'push' || vars.CI_TRIGGER_MODE == 'both')) + (github.event_name == 'workflow_dispatch' && (env.CI_TRIGGER_MODE == 'dispatch' || env.CI_TRIGGER_MODE == 'both')) || + (github.event_name == 'push' && (env.CI_TRIGGER_MODE == 'push' || env.CI_TRIGGER_MODE == 'both')) runs-on: ubuntu-latest env: