Skip to content

Commit

Permalink
fix: adds workaround hashFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-sartori-zupit committed Nov 28, 2024
1 parent ddd88cd commit eb599fb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
25 changes: 16 additions & 9 deletions .github/actions/dotnet/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@ inputs:
runs:
using: composite
steps:
- name: Create folder if not exist
shell: bash
run: mkdir -p ~/.nuget/packages${{ inputs.CACHE_SUFFIX }}

- name: Restore NuGet packages cache
uses: actions/cache@v3
with:
path: ~/.nuget/packages${{ inputs.CACHE_SUFFIX }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ github.run_id }}-${{ github.run_attempt }} # Temporary fix: ${{ hashFiles(format('{0}/**/packages.lock.json', inputs.WORKING_DIRECTORY)) }}
restore-keys: ${{ runner.os }}-nuget-
# - name: Create folder if not exist
# shell: bash
# run: mkdir -p ~/.nuget/packages${{ inputs.CACHE_SUFFIX }}

# - name: Restore NuGet packages cache
# uses: actions/cache@v3
# with:
# path: ~/.nuget/packages${{ inputs.CACHE_SUFFIX }}
# # key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
# key: ${{ runner.os }}-nuget-${{ github.run_id }}-${{ github.run_attempt }} # Temporary fix: ${{ hashFiles(format('{0}/**/packages.lock.json', inputs.WORKING_DIRECTORY)) }}
# restore-keys: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}

- name: Restore dependencies
shell: ${{ inputs.SHELL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar-step-dotnet-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
uses: actions/checkout@v4

- name: Install .NET
uses: zupit-it/pipeline-templates/.github/actions/dotnet/install@v1.24.0
uses: zupit-it/pipeline-templates/.github/actions/dotnet/install@ZCH-126/caching
with:
WORKING_DIRECTORY: ${{ inputs.WORKING_DIRECTORY }}
DOTNET_VERSION: ${{ inputs.DOTNET_VERSION }}
Expand Down

0 comments on commit eb599fb

Please sign in to comment.