File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : SH windows cache check with go v6
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches : [ "main" ]
7+
8+ env :
9+ GO_VERSION : ' 1.24'
10+
11+ jobs :
12+ build :
13+ runs-on : ${{ matrix.os }}
14+ strategy :
15+ matrix :
16+ os : [ self-hosted ]
17+ steps :
18+
19+ - name : building defsec
20+ run : echo "Building defsec..."
21+
22+ - uses : actions/checkout@v5
23+
24+ - name : Clean Go cache (may need admin rights)
25+ run : |
26+ if (Test-Path "C:\Users\Vysakh\go\pkg\mod") { Remove-Item -Recurse -Force "C:\Users\Vysakh\go\pkg\mod" }
27+ if (Test-Path "C:\Users\Vysakh\AppData\Local\go-build") { Remove-Item -Recurse -Force "C:\Users\Vysakh\AppData\Local\go-build" }
28+ shell : powershell
29+
30+ - name : Create Go build cache directory (only if not exists)
31+ run : |
32+ if (!(Test-Path -Path "C:\Users\Vysakh\AppData\Local\go-build")) {
33+ mkdir "C:\Users\Vysakh\AppData\Local\go-build"
34+ }
35+ if (!(Test-Path -Path "C:\Users\Vysakh\go\pkg\mod")) {
36+ mkdir "C:\Users\Vysakh\go\pkg\mod"
37+ }
38+ shell : powershell
39+
40+ - uses : lmvysakh/setup-go@windows_runner_cache_load_fix
41+ with :
42+ go-version : ${{ env.GO_VERSION }}
You can’t perform that action at this time.
0 commit comments