ci: use git URL rewrite with token for submodule auth

This commit is contained in:
datadunia
2026-06-10 05:02:41 +07:00
parent 946334ffc7
commit 43fd852b3e
6 changed files with 16 additions and 38 deletions
+6 -18
View File
@@ -15,16 +15,12 @@ jobs:
run:
working-directory: apps/server-core
steps:
- name: Rewrite submodule URLs
run: |
git config --global url."http://172.20.8.90:3000/".insteadOf "https://git.datadunia.com/"
git config --global url."http://172.20.8.90:3000/".insteadOf "http://git.datadunia.com/"
- 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
- uses: actions/setup-go@v5
with:
go-version: '1.26'
@@ -37,16 +33,12 @@ jobs:
run:
working-directory: apps/device-agent
steps:
- name: Rewrite submodule URLs
run: |
git config --global url."http://172.20.8.90:3000/".insteadOf "https://git.datadunia.com/"
git config --global url."http://172.20.8.90:3000/".insteadOf "http://git.datadunia.com/"
- 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
- uses: actions/setup-go@v5
with:
go-version: '1.26'
@@ -59,16 +51,12 @@ jobs:
run:
working-directory: apps/dashboard-ui
steps:
- name: Rewrite submodule URLs
run: |
git config --global url."http://172.20.8.90:3000/".insteadOf "https://git.datadunia.com/"
git config --global url."http://172.20.8.90:3000/".insteadOf "http://git.datadunia.com/"
- 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
- uses: actions/setup-node@v4
with:
node-version: '24'