From 0de6515cde965d7b8f287a3cc053821ee6d3a18c Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:49:20 +0100 Subject: [PATCH] Only run publish workflow on upstream repo When syncing forks, they also try to publish (which doesn't make a lot of sense and doesn't work) Ref: https://github.com/rubocop/rubocop-rspec/pull/2050 --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2c3c352b..b6446ab9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,6 +7,7 @@ jobs: publish: name: Publish to RubyGems runs-on: ubuntu-latest + if: github.repository_owner == 'rubocop' permissions: contents: write id-token: write