Skip to content

Commit 0bb6150

Browse files
erezrokahCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f31cd41 commit 0bb6150

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/unittest.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,18 @@ jobs:
2626
with:
2727
go-version-file: go.mod
2828
cache: false
29+
- name: Determine Go cache directories
30+
id: go-cache
31+
shell: bash
32+
run: |
33+
echo "gocache=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
34+
echo "gomodcache=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
2935
- name: Cache Go modules
3036
uses: actions/cache@v4
3137
with:
3238
path: |
33-
~/go/pkg/mod
34-
~/.cache/go-build
39+
${{ steps.go-cache.outputs.gomodcache }}
40+
${{ steps.go-cache.outputs.gocache }}
3541
key: ${{ runner.os }}-go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('**/go.sum') }}
3642
restore-keys: |
3743
${{ runner.os }}-go-${{ steps.setup-go.outputs.go-version }}-

0 commit comments

Comments
 (0)