From 5b8fa11ed901ae4d69290a327866f4b9cbe1884a Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 2 Nov 2024 15:23:10 +0200 Subject: [PATCH] Prevent double ci run if both push and pr happen --- .github/workflows/linux.yml | 1 + .github/workflows/macos.yml | 1 + .github/workflows/windows.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index fdd84a2c..8070a819 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -11,6 +11,7 @@ jobs: # ----------------------------------------------------------------------- build: runs-on: ubuntu-latest + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action == 'opened') defaults: run: shell: bash diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 60e9e745..4318cabc 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -8,6 +8,7 @@ permissions: jobs: build: runs-on: macOS-latest + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action == 'opened') name: "macOS Clang (C++11, Release)" steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 710e4090..f5c00409 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,6 +8,7 @@ permissions: jobs: build: runs-on: windows-latest + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action == 'opened') strategy: fail-fast: true matrix: