Skip to content

Commit

Permalink
ci: Only run once if pushing to main repo branch
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-lunarg committed Oct 22, 2024
1 parent b955ae0 commit 158e79e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ name: ci
on:
push:
pull_request:
branches:
- main

env:
CMAKE_GENERATOR: Ninja
Expand All @@ -19,6 +17,7 @@ permissions:
jobs:
cmake-unix:
runs-on: ${{ matrix.os }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
Expand All @@ -37,6 +36,7 @@ jobs:

cmake-windows:
runs-on: windows-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
cmake-version: [ '3.15', 'latest']
Expand All @@ -54,6 +54,7 @@ jobs:

windows_clang:
runs-on: windows-2022
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
compiler: [ clang, clang-cl ]
Expand All @@ -75,6 +76,7 @@ jobs:

reuse:
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:
- uses: actions/checkout@v4
- name: REUSE Compliance Check
Expand Down

0 comments on commit 158e79e

Please sign in to comment.