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:
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action == 'opened')
defaults:
run:
shell: bash

View File

@ -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

View File

@ -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: