Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/actions/nuget-cache-location/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: NuGet cache location
description: Moves the NuGet package and HTTP caches to the runner temp drive on GitHub-hosted Windows runners
runs:
using: composite
steps:
- name: Move NuGet caches to the temp drive
if: runner.os == 'Windows' && runner.environment == 'github-hosted'
shell: pwsh
run: |
$packages = Join-Path $Env:RUNNER_TEMP 'nuget\packages'
$httpCache = Join-Path $Env:RUNNER_TEMP 'nuget\http-cache'
New-Item -ItemType Directory -Force -Path $packages, $httpCache | Out-Null
"NUGET_PACKAGES=$packages" >> $Env:GITHUB_ENV
"NUGET_HTTP_CACHE_PATH=$httpCache" >> $Env:GITHUB_ENV
2 changes: 2 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- name: Move NuGet caches to the temp drive
uses: ./.github/actions/nuget-cache-location
- name: Setup .NET SDK
uses: actions/setup-dotnet@v6.0.0
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- name: Move NuGet caches to the temp drive
uses: ./.github/actions/nuget-cache-location
- name: Setup .NET SDK
uses: actions/setup-dotnet@v6.0.0
with:
Expand Down Expand Up @@ -214,6 +216,8 @@ jobs:
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- name: Move NuGet caches to the temp drive
uses: ./.github/actions/nuget-cache-location
- name: Setup .NET SDK
uses: actions/setup-dotnet@v6.0.0
with:
Expand Down
Loading