Require explicit NuGet PAT for Gitea package publishing
Some checks failed
NuGet Package Publish / nuget (push) Failing after 1m1s
Some checks failed
NuGet Package Publish / nuget (push) Failing after 1m1s
This commit is contained in:
@@ -47,14 +47,15 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
NUGET_SOURCE_URL: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/nuget/index.json
|
NUGET_SOURCE_URL: ${{ github.server_url }}/api/packages/${{ github.repository_owner }}/nuget/index.json
|
||||||
NUGET_USERNAME: ${{ secrets.NUGET_USERNAME || github.actor }}
|
NUGET_USERNAME: ${{ secrets.NUGET_USERNAME || github.repository_owner }}
|
||||||
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN || secrets.PACKAGE_TOKEN || secrets.GITHUB_TOKEN }}
|
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if [ -z "${NUGET_TOKEN:-}" ]; then
|
if [ -z "${NUGET_TOKEN:-}" ]; then
|
||||||
echo "NUGET_TOKEN and GITHUB_TOKEN are both unavailable."
|
echo "Missing required secret: NUGET_TOKEN"
|
||||||
echo "Configure one of: secrets.NUGET_TOKEN (preferred) or secrets.GITHUB_TOKEN."
|
echo "Set repository Actions secret NUGET_TOKEN to a Gitea PAT with package write permission."
|
||||||
|
echo "Optional: set NUGET_USERNAME if your PAT owner differs from repository owner."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user