fix(ci): move token+persist-credentials to test job checkout, insteadOf after checkout
CI / dashboard-test (push) Successful in 1m24s
CI / build-server-core (push) Has been skipped
CI / build-device-agent (push) Has been skipped
CI / build-dashboard (push) Has been skipped
CI / build-docs (push) Has been skipped
CI / release (push) Has been skipped
CI / server-core-test (push) Failing after 4m31s
CI / device-agent-test (push) Successful in 1m22s
CI / dashboard-test (push) Successful in 1m24s
CI / build-server-core (push) Has been skipped
CI / build-device-agent (push) Has been skipped
CI / build-dashboard (push) Has been skipped
CI / build-docs (push) Has been skipped
CI / release (push) Has been skipped
CI / server-core-test (push) Failing after 4m31s
CI / device-agent-test (push) Successful in 1m22s
Test jobs failed because actions/checkout@v4 erases global insteadOf during 'Setting up auth for fetching submodules', replacing it with SSH mappings that don't help with x-access-token auth. Fix: Add token + persist-credentials to checkout (same pattern as reusable build workflows that pass), and move insteadOf after checkout as a safety net for subsequent git operations.
This commit is contained in:
+12
-6
@@ -15,12 +15,14 @@ jobs:
|
||||
if: contains(gitea.ref_name, 'test')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Configure git auth for submodules
|
||||
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.BUILD_TOKEN }}
|
||||
persist-credentials: true
|
||||
- name: Configure git auth for submodules
|
||||
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.26'
|
||||
@@ -37,12 +39,14 @@ jobs:
|
||||
if: contains(gitea.ref_name, 'test')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Configure git auth for submodules
|
||||
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.BUILD_TOKEN }}
|
||||
persist-credentials: true
|
||||
- name: Configure git auth for submodules
|
||||
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.26'
|
||||
@@ -54,12 +58,14 @@ jobs:
|
||||
if: contains(gitea.ref_name, 'test')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Configure git auth for submodules
|
||||
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.BUILD_TOKEN }}
|
||||
persist-credentials: true
|
||||
- name: Configure git auth for submodules
|
||||
run: git config --global url."https://x-access-token:${{ secrets.BUILD_TOKEN }}@git.datadunia.com/".insteadOf "https://git.datadunia.com/"
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '24'
|
||||
|
||||
Reference in New Issue
Block a user