actions / setup-dotnet

Set up your GitHub Actions workflow with a specific version of the .NET core sdk
MIT License
922 stars 454 forks source link

Run auth util but skip dotnet installation #345

Open sliekens opened 1 year ago

sliekens commented 1 year ago

Description: I would like to be able to run the auth util only and skip the dotnet installer.

- name: Configure GPR authentication
  uses: actions/setup-dotnet@v3
  env:
    NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
  with:
    source-url: https://nuget.pkg.github.com/sliekens/index.json
    dotnet-version: 'none'
    global-json-file: 'ignore ./global.json'

Justification: I'm running jobs inside a container that already contains the exact SDK versions needed.

Are you willing to submit a PR?

It depends

IvanZosimov commented 1 year ago

Hi, @sliekens 👋 Thank you for your feature request. We will investigate it and come back to you with our decision about it :)

sliekens commented 1 year ago

One more justification: Azure Pipelines has separate tasks for installing dotnet and for auth. https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/package/nuget-authenticate?view=azure-devops

I imagine it can be difficult for someone to move from Az Pipelines to GH Actions when you only need NuGet Authenticate.