Prevent double ci run if both push and pr happen

This commit is contained in:
gabime 2024-11-02 15:23:10 +02:00
parent dd5eced094
commit 5b8fa11ed9
3 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,7 @@ jobs:
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action == 'opened')
defaults: defaults:
run: run:
shell: bash shell: bash

View File

@ -8,6 +8,7 @@ permissions:
jobs: jobs:
build: build:
runs-on: macOS-latest runs-on: macOS-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action == 'opened')
name: "macOS Clang (C++11, Release)" name: "macOS Clang (C++11, Release)"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@ -8,6 +8,7 @@ permissions:
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action == 'opened')
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix: