From e98d958f5283edb2c508daeec53ab8bc48f87321 Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Mon, 14 Oct 2024 17:45:52 +0100 Subject: [PATCH] Default to nuget.org without cache --- .github/actions/dotnet-tool/action.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/actions/dotnet-tool/action.yml b/.github/actions/dotnet-tool/action.yml index dcc7c0c5..8370286f 100644 --- a/.github/actions/dotnet-tool/action.yml +++ b/.github/actions/dotnet-tool/action.yml @@ -9,6 +9,10 @@ inputs: description: 'Tool version to install' required: false default: 'latest' + NUGET_SOURCE: + description: 'Nuget source' + required: false + default: 'https://api.nuget.org/v3/index.json' runs: using: "composite" @@ -17,7 +21,13 @@ runs: - name: "Install dotnet tool (Latest)" if: inputs.TOOL_VERSION == 'latest' shell: bash - run: dotnet tool install --local --ignore-failed-sources ${{inputs.TOOL_NAME}} + run: | + dotnet tool install \ + --local \ + --ignore-failed-sources \ + --no-http-cache \ + --source "${{inputs.NUGET_SOURCE}}" \ + "${{inputs.TOOL_NAME}}" env: DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" DOTNET_INSTALL_DIR: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" @@ -35,7 +45,14 @@ runs: - name: "Install dotnet tool (Specific Version)" if: inputs.TOOL_VERSION != 'latest' shell: bash - run: dotnet tool install --local --ignore-failed-sources ${{inputs.TOOL_NAME}} --version ${{inputs.TOOL_VERSION}} + run: | + dotnet tool install \ + --local \ + --ignore-failed-sources \ + --no-http-cache \ + --source "${{inputs.NUGET_SOURCE}}" \ + "${{inputs.TOOL_NAME}}" \ + --version ${{inputs.TOOL_VERSION}} env: DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" DOTNET_INSTALL_DIR: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}"