From 2f0da31df8bf3b7935ee712de00db301af77a502 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Tue, 19 Dec 2023 10:52:37 +0100 Subject: [PATCH 1/2] gh actions: disable job on forked PR's --- .github/workflows/issues-workflow.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/issues-workflow.yaml b/.github/workflows/issues-workflow.yaml index 3017271d7..1415984ca 100644 --- a/.github/workflows/issues-workflow.yaml +++ b/.github/workflows/issues-workflow.yaml @@ -11,6 +11,7 @@ on: jobs: add-to-project: name: Add issue to project + if: github.event.pull_request.head.repo.full_name == github.repository # Only run jobs if the feature branch is in your repo (not in a fork) runs-on: ubuntu-latest steps: - uses: actions/add-to-project@v0.5.0 From bb6ed3907646e776d9ac4bd5ef8759c2b9ac1b39 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Tue, 19 Dec 2023 18:19:52 +0100 Subject: [PATCH 2/2] gh actions: disable job on forked PR's OR it's an issue --- .github/workflows/issues-workflow.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issues-workflow.yaml b/.github/workflows/issues-workflow.yaml index 1415984ca..27daba838 100644 --- a/.github/workflows/issues-workflow.yaml +++ b/.github/workflows/issues-workflow.yaml @@ -11,7 +11,10 @@ on: jobs: add-to-project: name: Add issue to project - if: github.event.pull_request.head.repo.full_name == github.repository # Only run jobs if the feature branch is in your repo (not in a fork) + # Only run jobs if the feature branch is in your repo (not in a fork) + # OR + # it is an issue + if: github.event.pull_request.head.repo.full_name == github.repository || github.event.issue.number != '' runs-on: ubuntu-latest steps: - uses: actions/add-to-project@v0.5.0