Skip to content

Commit c1fc2db

Browse files
ci(.github/workflows): install .NET to a user-writable dir on peco-driver (#541)
## Problem The engineer-bot Fix workflow fails at **Setup .NET** on the self-hosted peco-driver runner: > mkdir: cannot create directory '/usr/share/dotnet': Permission denied > ##[error]Failed to install dotnet, exit code: 1 `actions/setup-dotnet` installs to root-owned `/usr/share/dotnet`, but the runner runs as non-root (`azureuser`). ## Fix Set `DOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet` on the Setup .NET step in `engineer-bot.yaml` + `engineer-bot-followup.yml`, so it installs to a user-writable dir (setup-dotnet then adds it to PATH + sets DOTNET_ROOT for later steps). Self-contained; works regardless of which peco-driver runner the job lands on. Same non-root-runner class we already fixed for the Python venv (#539) and the npm prefix (#540). (`reyden-rest-nightly.yml` happens to land on runners with .NET pre-installed, so it no-ops setup-dotnet — but the bots can't rely on that.) This pull request and its description were written by Isaac.
1 parent 61e60f9 commit c1fc2db

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/engineer-bot-followup.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ jobs:
189189
190190
- name: Setup .NET
191191
if: steps.filter.outputs.skip != 'true'
192+
# Self-hosted peco-driver runs as non-root; setup-dotnet's default
193+
# /usr/share/dotnet is root-owned (EACCES). Install to a writable dir.
194+
env:
195+
DOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet
192196
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
193197
with:
194198
dotnet-version: '8.0.x'

.github/workflows/engineer-bot.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ jobs:
119119
echo "$RUNNER_TEMP/bot-venv/bin" >> "$GITHUB_PATH"
120120
121121
- name: Setup .NET
122+
# Self-hosted peco-driver runs as non-root; setup-dotnet's default
123+
# /usr/share/dotnet is root-owned (EACCES). Install to a writable dir.
124+
env:
125+
DOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet
122126
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
123127
with:
124128
dotnet-version: '8.0.x'

0 commit comments

Comments
 (0)