Install the pinned .NET SDK to a runner-writable dir on self-hosted CI

setup-dotnet defaulted to /usr/share/dotnet, which the runner user cannot
write to (Permission denied). Point DOTNET_INSTALL_DIR at runner.tool_cache
so the 8.0 SDK installs into a writable, cached location.
This commit is contained in:
NomadsReach
2026-08-16 17:43:16 -04:00
parent 48ee0da01f
commit 9c4580daaf
+4
View File
@@ -9,6 +9,10 @@ jobs:
build-and-test: build-and-test:
name: Repository policy, C# build and test name: Repository policy, C# build and test
runs-on: [self-hosted, Linux, X64] runs-on: [self-hosted, Linux, X64]
# The self-hosted runner user cannot write to the system /usr/share/dotnet,
# so install the pinned SDK into a runner-writable (and cached) path instead.
env:
DOTNET_INSTALL_DIR: ${{ runner.tool_cache }}/dotnet
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4