Skip to content

Commit 6f1d02e

Browse files
committed
fix: enhance Git and Go configuration for private repositories
1 parent ee70dd0 commit 6f1d02e

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

.github/workflows/validate.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v5
1212

13+
- name: Configure Git for private repos
14+
env:
15+
GOPLUS_TOKEN: ${{ secrets.GOPLUS_TOKEN }}
16+
run: |
17+
git config --global url."https://${GOPLUS_TOKEN}@github.com/".insteadOf "https://github.com/"
18+
git config --global url."https://${GOPLUS_TOKEN}@github.com/".insteadOf "[email protected]:"
19+
1320
- name: Enable Corepack
1421
run: corepack enable
1522

@@ -45,6 +52,11 @@ jobs:
4552
with:
4653
go-version: 1.24.x
4754

55+
- name: Configure Go private modules
56+
run: |
57+
go env -w GOPRIVATE=github.com/goplus/sb2xbp
58+
go env -w GONOSUMDB=github.com/goplus/sb2xbp
59+
4860
- name: Build WASM
4961
working-directory: spx-gui
5062
run: ./build-wasm.sh
@@ -62,23 +74,34 @@ jobs:
6274
steps:
6375
- uses: actions/checkout@v5
6476

65-
- name: Set up Go & XGo
66-
uses: goplus/setup-xgo@v1
67-
with:
68-
go-version: 1.24.x
69-
xgo-version: 1.5.x
70-
7177
- name: Configure Git for private repos
7278
env:
7379
GOPLUS_TOKEN: ${{ secrets.GOPLUS_TOKEN }}
7480
run: |
7581
git config --global url."https://${GOPLUS_TOKEN}@github.com/".insteadOf "https://github.com/"
7682
git config --global url."https://${GOPLUS_TOKEN}@github.com/".insteadOf "[email protected]:"
83+
echo "Git configuration applied:"
84+
git config --global --list | grep url
85+
86+
- name: Set up Go & XGo
87+
uses: goplus/setup-xgo@v1
88+
with:
89+
go-version: 1.24.x
90+
xgo-version: 1.5.x
7791

7892
- name: Configure Go private modules
7993
run: |
8094
go env -w GOPRIVATE=github.com/goplus/sb2xbp
8195
go env -w GONOSUMDB=github.com/goplus/sb2xbp
96+
echo "Go environment:"
97+
go env GOPRIVATE
98+
go env GONOSUMDB
99+
100+
- name: Clear Go module cache and verify access
101+
run: |
102+
go clean -modcache
103+
echo "Testing git access to private repo..."
104+
git ls-remote https://github.com/goplus/sb2xbp.git || echo "Git access test failed"
82105
83106
- name: Run unit test cases
84107
working-directory: spx-backend

0 commit comments

Comments
 (0)