From ac85367b17b545de05d629e145903555fae74597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Barr=C3=A9?= Date: Fri, 27 Mar 2026 21:31:58 -0400 Subject: [PATCH] Skip NuGet publish steps 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> --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 443f9a63..63d0f69b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,6 +170,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v4 - name: NuGet login (OIDC → temp API key) + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository uses: NuGet/login@v1 id: login with: @@ -190,7 +191,7 @@ jobs: } } name: Publish NuGet packages - if: always() + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository env: NuGetApiKey: ${{steps.login.outputs.NUGET_API_KEY}} FeedzApiKey: ${{ secrets.FEEDZ_APIKEY }}