Skip to content

Commit

Permalink
[Actions] Updated .github/actions/dotnet-tool/action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
credfeto committed Oct 14, 2024
1 parent 40790de commit a5fff71
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/actions/dotnet-tool/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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}}"
Expand All @@ -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}}"
Expand Down

0 comments on commit a5fff71

Please sign in to comment.