Skip to content

Commit ad48d24

Browse files
committed
Avoid dotnet restore on cache hit
1 parent fe1609e commit ad48d24

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
},
4343
{
4444
"uses": "actions/cache@v3",
45+
"id": "nuget-cache",
4546
"with": {
4647
"path": "${{ env.NUGET_PACKAGES }}",
4748
"key": "${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}",
@@ -50,6 +51,7 @@
5051
},
5152
{
5253
"name": "Restore NuGet packages",
54+
"if": "steps.nuget-cache.outputs.cache-hit != 'true'",
5355
"run": "dotnet restore --locked-mode"
5456
},
5557
{

0 commit comments

Comments
 (0)