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