Skip to content

Skip NuGet publish steps for fork PRs in CI#1063

Merged
meziantou merged 1 commit intomainfrom
fix-ci-fork-deploy
Mar 28, 2026
Merged

Skip NuGet publish steps for fork PRs in CI#1063
meziantou merged 1 commit intomainfrom
fix-ci-fork-deploy

Conversation

@meziantou
Copy link
Copy Markdown
Owner

The deploy job in CI requires OIDC authentication (NuGet/login) and secrets (FEEDZ_APIKEY) to publish NuGet packages. Fork PRs don't have access to either, causing the job to fail. Since deploy is a required check, this blocks merging any fork contribution.

This adds a condition to the NuGet login and publish steps so they are skipped when the PR comes from a fork, while the deploy job itself still runs and succeeds. The condition used is:

github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

This ensures publishing runs for pushes to main, workflow dispatches, and same-repo PRs — but is safely skipped for fork PRs.

Fork PRs don't have access to secrets or OIDC authentication,
causing the deploy job to fail. Add conditions to skip the
NuGet login and publish steps when the PR comes from a fork,
while keeping the deploy job itself green.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@meziantou meziantou merged commit 42b20f2 into main Mar 28, 2026
13 checks passed
@meziantou meziantou deleted the fix-ci-fork-deploy branch March 28, 2026 01:43
This was referenced Mar 28, 2026
This was referenced Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant