1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-09-25 17:51:11 +02:00

Try more specific go cache

This commit is contained in:
Kristoffer Dalby 2022-05-20 18:14:43 +02:00
parent bcb30d1577
commit a630546bb8

View File

@ -13,6 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
- uses: actions/checkout@v2
with:
fetch-depth: 2
@ -28,15 +33,18 @@ jobs:
integration_test/
config-example.yaml
- uses: actions/cache@v3
- name: Go Build Cache
uses: actions/cache@v3
if: steps.changed-files.outputs.any_changed == 'true'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
path: ${{ steps.go-cache-paths.outputs.go-build }}
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
- name: Go Mod Cache
uses: actions/cache@v2
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
- uses: cachix/install-nix-action@v16
if: steps.changed-files.outputs.any_changed == 'true'