From fc356012e60e5bee20d490b4636dd5c2ac12529f Mon Sep 17 00:00:00 2001 From: cesnimda Date: Sat, 11 Jul 2026 13:02:37 +0200 Subject: [PATCH] ci: install .NET via retrying dotnet-install.sh instead of setup-dotnet The single self-hosted act_runner intermittently fails actions/setup-dotnet: a partial extraction sticks in the shared tool-cache (tar: Cannot open: File exists) or the SDK tarball download corrupts. Install into a clean private $HOME/.dotnet via dotnet-install.sh with a rm -rf + retry-once, matching the npm ci and NuGet publish retries already in this pipeline. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/ci-deploy.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci-deploy.yml b/.gitea/workflows/ci-deploy.yml index 1e83db2..d0184ad 100644 --- a/.gitea/workflows/ci-deploy.yml +++ b/.gitea/workflows/ci-deploy.yml @@ -13,10 +13,22 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '9.0.x' + - name: Setup .NET (resilient) + shell: bash + # actions/setup-dotnet on this single self-hosted runner intermittently + # leaves a partial extraction in the shared tool-cache ("tar: Cannot open: + # File exists") or corrupts the SDK download. Install into a clean private + # dir via dotnet-install.sh and retry once on failure, mirroring the + # npm ci / NuGet retries elsewhere in this workflow. + run: | + install() { + curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh + rm -rf "$HOME/.dotnet" + bash /tmp/dotnet-install.sh --channel 9.0 --install-dir "$HOME/.dotnet" + } + install || ( echo "dotnet install failed ($?) — retrying once..." && install ) + echo "$HOME/.dotnet" >> "$GITHUB_PATH" + "$HOME/.dotnet/dotnet" --info - name: Setup Node uses: actions/setup-node@v4