From 1ca33b91a97a612b211653375b25d6c95b2dd6f4 Mon Sep 17 00:00:00 2001 From: Ethan Dye Date: Mon, 23 Dec 2024 11:43:30 -0700 Subject: [PATCH] Prevent duplicate workflow runs for PRs (#1938) --- .github/workflows/bats-action.yml | 1 + .github/workflows/build-action.yml | 1 + .github/workflows/installation-action.yml | 1 + .github/workflows/shellcheck-action.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/bats-action.yml b/.github/workflows/bats-action.yml index 58183f4d9..3f60be0ab 100644 --- a/.github/workflows/bats-action.yml +++ b/.github/workflows/bats-action.yml @@ -37,6 +37,7 @@ on: jobs: bats-tests: runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name services: registry: image: registry:2 diff --git a/.github/workflows/build-action.yml b/.github/workflows/build-action.yml index 0d831c3cb..ef2f83394 100644 --- a/.github/workflows/build-action.yml +++ b/.github/workflows/build-action.yml @@ -25,6 +25,7 @@ on: jobs: build: runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - name: Checkout repository diff --git a/.github/workflows/installation-action.yml b/.github/workflows/installation-action.yml index 02f05ddd2..b96c4b8c1 100644 --- a/.github/workflows/installation-action.yml +++ b/.github/workflows/installation-action.yml @@ -31,6 +31,7 @@ on: jobs: installation-tests: runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name services: registry: image: registry:2 diff --git a/.github/workflows/shellcheck-action.yml b/.github/workflows/shellcheck-action.yml index 9e1532352..fabe13edb 100644 --- a/.github/workflows/shellcheck-action.yml +++ b/.github/workflows/shellcheck-action.yml @@ -18,6 +18,7 @@ on: jobs: shellcheck: runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - name: Checkout repository