From eb283ad9d71a8277c599d04f8c3f37131880b185 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Mon, 8 Jan 2024 19:35:17 -0700 Subject: [PATCH] Only run GitHub action from jenkinsci repositories Avoid 'Run failed' mail messages from forks --- .github/workflows/release-drafter.yml | 1 + .github/workflows/updatecli.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 5aca1f3ff7..bccb122f37 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -11,6 +11,7 @@ on: jobs: update_release_draft: runs-on: ubuntu-latest + if: github.repository_owner == 'jenkins-infra' steps: # Drafts your next Release notes as Pull Requests are merged into the default branch - uses: release-drafter/release-drafter@v5 diff --git a/.github/workflows/updatecli.yaml b/.github/workflows/updatecli.yaml index b1ebf81864..8a11a3bd4f 100644 --- a/.github/workflows/updatecli.yaml +++ b/.github/workflows/updatecli.yaml @@ -10,6 +10,7 @@ on: jobs: updatecli: runs-on: ubuntu-latest + if: github.repository_owner == 'jenkins-infra' steps: - name: Checkout uses: actions/checkout@v4