From 54fdb357d3a873e57b1976732b953deb4f64fd31 Mon Sep 17 00:00:00 2001 From: Even Zhou Date: Mon, 23 Mar 2026 14:36:35 +0800 Subject: [PATCH] [CI][NPU] Fix git report dubious ownership (#21162) --- .github/workflows/pr-test-npu.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/pr-test-npu.yml b/.github/workflows/pr-test-npu.yml index 6d91dfde4..f3d99fdda 100644 --- a/.github/workflows/pr-test-npu.yml +++ b/.github/workflows/pr-test-npu.yml @@ -92,6 +92,10 @@ jobs: with: ref: ${{ inputs.ref || github.ref }} + - name: Mark repository safe + run: | + git config --system --add safe.directory ${GITHUB_WORKSPACE} + - name: Install dependencies env: TORCH_CACHE_URL: "http://cache-service.nginx-pypi-cache.svc.cluster.local/whl/cpu" @@ -152,6 +156,10 @@ jobs: with: ref: ${{ inputs.ref || github.ref }} + - name: Mark repository safe + run: | + git config --system --add safe.directory ${GITHUB_WORKSPACE} + - name: Install dependencies env: TORCH_CACHE_URL: "http://cache-service.nginx-pypi-cache.svc.cluster.local/whl/cpu" @@ -195,6 +203,10 @@ jobs: with: ref: ${{ inputs.ref || github.ref }} + - name: Mark repository safe + run: | + git config --system --add safe.directory ${GITHUB_WORKSPACE} + - name: Install dependencies env: TORCH_CACHE_URL: "http://cache-service.nginx-pypi-cache.svc.cluster.local/whl/cpu" @@ -238,6 +250,10 @@ jobs: with: ref: ${{ inputs.ref || github.ref }} + - name: Mark repository safe + run: | + git config --system --add safe.directory ${GITHUB_WORKSPACE} + - name: Install dependencies env: TORCH_CACHE_URL: "http://cache-service.nginx-pypi-cache.svc.cluster.local/whl/cpu" @@ -279,6 +295,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Mark repository safe + run: | + git config --system --add safe.directory ${GITHUB_WORKSPACE} + - name: Install dependencies env: TORCH_CACHE_URL: "http://cache-service.nginx-pypi-cache.svc.cluster.local/whl/cpu" @@ -321,6 +341,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Mark repository safe + run: | + git config --system --add safe.directory ${GITHUB_WORKSPACE} + - name: Install dependencies env: TORCH_CACHE_URL: "http://cache-service.nginx-pypi-cache.svc.cluster.local/whl/cpu" @@ -363,6 +387,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Mark repository safe + run: | + git config --system --add safe.directory ${GITHUB_WORKSPACE} + - name: Install dependencies run: | # speed up by using infra cache services