mirror of
https://github.com/rnvm9wjdtj-bot/myaps_api.git
synced 2026-06-02 05:54:40 +00:00
ci(github workflow): 修复ci配置中环境变量引用格式
将硬编码的env.CI_TARGET_REPO改为正确的${{ env.CI_TARGET_REPO }}格式,确保工作流条件判断能正确识别目标仓库
This commit is contained in:
@@ -32,7 +32,7 @@ jobs:
|
||||
lint-and-format:
|
||||
name: 代码检查
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == env.CI_TARGET_REPO
|
||||
if: github.repository == ${{ env.CI_TARGET_REPO }}
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
name: 构建与测试
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint-and-format
|
||||
if: github.repository == env.CI_TARGET_REPO
|
||||
if: github.repository == ${{ env.CI_TARGET_REPO }}
|
||||
|
||||
services:
|
||||
postgres:
|
||||
@@ -209,7 +209,7 @@ jobs:
|
||||
name: 安全扫描
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint-and-format
|
||||
if: github.repository == env.CI_TARGET_REPO
|
||||
if: github.repository == ${{ env.CI_TARGET_REPO }}
|
||||
steps:
|
||||
- name: 检出代码
|
||||
uses: actions/checkout@v4
|
||||
@@ -248,7 +248,7 @@ jobs:
|
||||
name: 构建交付物
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-and-test, security-scan]
|
||||
if: github.repository == env.CI_TARGET_REPO && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||
if: github.repository == ${{ env.CI_TARGET_REPO }} && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||
|
||||
outputs:
|
||||
image-tag: ${{ steps.meta.outputs.version }}
|
||||
|
||||
Reference in New Issue
Block a user