From 3ddb537e23563d2ce1adb0ed70d33751b054c585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20St=C3=BChmer?= Date: Tue, 17 Dec 2024 21:49:00 +0100 Subject: [PATCH] fix: Only allow publish/release on push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Stühmer --- .github/workflows/cicd-dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd-dotnet.yml b/.github/workflows/cicd-dotnet.yml index db7e351..d252ad9 100644 --- a/.github/workflows/cicd-dotnet.yml +++ b/.github/workflows/cicd-dotnet.yml @@ -146,7 +146,7 @@ jobs: publish-nuget: name: Publish NuGet - if: ${{ inputs.disablePublish == false && github.actor != 'dependabot[bot]' }} + if: ${{ inputs.disablePublish == false && github.event_name == 'push' && github.actor != 'dependabot[bot]' }} uses: ./.github/workflows/step-dotnet-publish-nuget.yml needs: - build @@ -155,7 +155,7 @@ jobs: release: name: Release - if: ${{ inputs.disablePublish == false && github.actor != 'dependabot[bot]' }} + if: ${{ inputs.disablePublish == false && github.event_name == 'push' && github.actor != 'dependabot[bot]' }} needs: - version - build