From 7e6fd14cc33b8c59ad11ef346993f85d1e8ffd83 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 10 Oct 2024 14:08:16 +0200 Subject: [PATCH] Fix cache key for nuget packages in github actions --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4558d44b..beff0916 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,6 +24,7 @@ concurrency: env: ELASTIC_STACK_VERSION: '8.4.0' + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages jobs: @@ -34,11 +35,11 @@ jobs: - uses: actions/checkout@v4 - name: Bootstrap Action Workspace uses: ./.github/workflows/bootstrap - + - uses: actions/cache@v4 with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + path: ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.[cf]sproj*') }}-${{ hashFiles('**/*.Build.props') }} restore-keys: | ${{ runner.os }}-nuget-