|
65 | 65 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 |
66 | 66 | with: |
67 | 67 | fetch-depth: 1 |
| 68 | + - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a |
| 69 | + with: |
| 70 | + path: | |
| 71 | + ~/.cache/go-build |
| 72 | + ~/go/pkg/mod |
| 73 | + key: setup-go-${{ runner.os }}-x64-ubuntu22-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }} |
| 74 | + restore-keys: | |
| 75 | + setup-go-${{ runner.os }}-x64-ubuntu22-go-${{ env.GO_VERSION }}- |
68 | 76 | - uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd |
69 | 77 | with: |
70 | 78 | languages: go |
@@ -304,17 +312,15 @@ jobs: |
304 | 312 | runs-on: windows-2022 |
305 | 313 | permissions: |
306 | 314 | contents: read |
| 315 | + env: |
| 316 | + GOPATH: 'D:\golang\go' |
| 317 | + GOCACHE: 'D:\golang\cache' |
| 318 | + GOMODCACHE: 'D:\golang\modcache' |
307 | 319 | steps: |
308 | 320 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 |
309 | 321 | - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed |
310 | 322 | with: |
311 | 323 | go-version: ${{ env.GO_VERSION }} |
312 | | - - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a |
313 | | - with: |
314 | | - path: ~/go/pkg/mod |
315 | | - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} |
316 | | - restore-keys: | |
317 | | - ${{ runner.os }}-go- |
318 | 324 | - name: build |
319 | 325 | run: | |
320 | 326 | go build ./... |
@@ -386,6 +392,11 @@ jobs: |
386 | 392 | runs-on: ${{ matrix.runs-on }} |
387 | 393 | permissions: |
388 | 394 | contents: read |
| 395 | + env: |
| 396 | + GOPATH: ${{ startsWith(matrix.runs-on, 'windows') && 'D:\golang\go' || '' }} |
| 397 | + GOCACHE: ${{ startsWith(matrix.runs-on, 'windows') && 'D:\golang\cache' || '' }} |
| 398 | + GOMODCACHE: ${{ startsWith(matrix.runs-on, 'windows') && 'D:\golang\modcache' || '' }} |
| 399 | + USERPROFILE: ${{ startsWith(matrix.runs-on, 'windows') && 'D:\homedir' || '' }} |
389 | 400 | steps: |
390 | 401 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 |
391 | 402 | - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed |
|
0 commit comments