Files
common/nuget/nuget/action.yaml
2026-01-01 18:39:57 -08:00

42 lines
1.3 KiB
YAML

name: nuget
description: "Run a nuget command."
inputs:
command:
description: "Nuget command to run."
required: false
catchErrors:
description: "Whether or not errors should be handled."
required: false
source:
description: "Name of the source to use."
required: false
default: origin
url:
description: "Url of the NuGet repository."
required: false
# This is for GitHub.
#default: ${{ github.server_url }}/_registry/nuget/${{ github.repository_owner }}/index.json
# This is for Gitea.
default: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/nuget/
username:
description: "Username for the nuget repository to search."
required: false
default: ${{ github.actor }}
password:
description: "Password or ApiKey of the nuget repository to search."
required: false
default: ${{ github.token }}
outputs:
console:
description: "The console output of the command."
runs:
using: 'docker'
image: 'Dockerfile'
env:
NUGET_SOURCE_NAME: ${{ inputs.source }}
NUGET_SOURCE_URL: ${{ inputs.url }}
NUGET_SOURCE_USERNAME: ${{ inputs.username }}
NUGET_SOURCE_PASSWORD: ${{ inputs.password }}
CATCH_ERRORS: ${{ inputs.catchErrors }}
args:
- ${{ inputs.command }}