Skip to content

Commit 6b5b8cd

Browse files
author
lmvysakh
committed
SH windows cache check with go v5
1 parent 7857238 commit 6b5b8cd

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: SH windows cache check with go v5
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+
shell: powershell
36+
37+
- uses: actions/setup-go@v5
38+
with:
39+
go-version: ${{ env.GO_VERSION }}

0 commit comments

Comments
 (0)