From 0276ce572e6a5e550518284041736b38028a7036 Mon Sep 17 00:00:00 2001 From: Vignesh Venkat Date: Wed, 17 Jul 2024 11:03:48 -0700 Subject: [PATCH] ci: Run on push only in the `main` branch This avoids excessive CI runs when pushing changes to other branches on forks. --- .github/workflows/ci-android-jni.yml | 6 +++++- .github/workflows/ci-disable-gtest.yml | 2 ++ .github/workflows/ci-linux-golden-tests.yml | 6 +++++- .github/workflows/ci-linux-static-old-local.yml | 2 ++ .github/workflows/ci-mingw.yml | 6 +++++- .github/workflows/ci-unix-shared-installed.yml | 6 +++++- .github/workflows/ci-unix-shared-local.yml | 6 +++++- .github/workflows/ci-unix-static-av2.yml | 2 ++ .github/workflows/ci-unix-static-sanitized.yml | 2 ++ .github/workflows/ci-unix-static.yml | 2 ++ .github/workflows/ci-windows-installed.yml | 6 +++++- .github/workflows/ci-windows.yml | 2 ++ .github/workflows/cifuzz.yml | 2 ++ .github/workflows/clang-format-check.yml | 6 +++++- 14 files changed, 49 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-android-jni.yml b/.github/workflows/ci-android-jni.yml index 097f1534ab..a6feb125a3 100644 --- a/.github/workflows/ci-android-jni.yml +++ b/.github/workflows/ci-android-jni.yml @@ -1,5 +1,9 @@ name: CI Android JNI -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: permissions: contents: read diff --git a/.github/workflows/ci-disable-gtest.yml b/.github/workflows/ci-disable-gtest.yml index 39e4755d1e..1f8a0db5a3 100644 --- a/.github/workflows/ci-disable-gtest.yml +++ b/.github/workflows/ci-disable-gtest.yml @@ -7,6 +7,8 @@ name: CI Disable GTest on: push: + branches: + - main pull_request: paths: - '.github/workflows/ci-disable-gtest.yml' diff --git a/.github/workflows/ci-linux-golden-tests.yml b/.github/workflows/ci-linux-golden-tests.yml index b02894222f..2c288fbb37 100644 --- a/.github/workflows/ci-linux-golden-tests.yml +++ b/.github/workflows/ci-linux-golden-tests.yml @@ -3,7 +3,11 @@ # which can be downloaded from GitHub'S UI or with 'gh run download'. name: CI Linux Golden Tests -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: permissions: contents: read diff --git a/.github/workflows/ci-linux-static-old-local.yml b/.github/workflows/ci-linux-static-old-local.yml index 4d25be6044..4beb098174 100644 --- a/.github/workflows/ci-linux-static-old-local.yml +++ b/.github/workflows/ci-linux-static-old-local.yml @@ -1,6 +1,8 @@ name: CI Unix Static For AVIF_LOCAL on: push: + branches: + - main pull_request: paths: - '.github/workflows/ci-linux-static-old-local.yml' diff --git a/.github/workflows/ci-mingw.yml b/.github/workflows/ci-mingw.yml index 7d910e20da..73b3545640 100644 --- a/.github/workflows/ci-mingw.yml +++ b/.github/workflows/ci-mingw.yml @@ -2,7 +2,11 @@ # with an additional build configuration (using installed deps and dav1d). name: CI MinGW -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: permissions: contents: read diff --git a/.github/workflows/ci-unix-shared-installed.yml b/.github/workflows/ci-unix-shared-installed.yml index 961e9972eb..a6eb8b0489 100644 --- a/.github/workflows/ci-unix-shared-installed.yml +++ b/.github/workflows/ci-unix-shared-installed.yml @@ -2,7 +2,11 @@ # with an additional build configuration (using installed deps and dav1d). name: CI Unix Shared Installed -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: permissions: contents: read diff --git a/.github/workflows/ci-unix-shared-local.yml b/.github/workflows/ci-unix-shared-local.yml index d6d2cea3a0..c5719ba408 100644 --- a/.github/workflows/ci-unix-shared-local.yml +++ b/.github/workflows/ci-unix-shared-local.yml @@ -4,7 +4,11 @@ # * Does not build rav1e, SVT-AV1 nor libgav1. name: CI Unix Shared Local -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: permissions: contents: read diff --git a/.github/workflows/ci-unix-static-av2.yml b/.github/workflows/ci-unix-static-av2.yml index cb7d16942d..5b5c574606 100644 --- a/.github/workflows/ci-unix-static-av2.yml +++ b/.github/workflows/ci-unix-static-av2.yml @@ -1,6 +1,8 @@ name: CI Unix Static AV2 on: push: + branches: + - main pull_request: paths: - '.github/workflows/ci-unix-static-av2.yml' diff --git a/.github/workflows/ci-unix-static-sanitized.yml b/.github/workflows/ci-unix-static-sanitized.yml index 08c223dd33..3b92afb090 100644 --- a/.github/workflows/ci-unix-static-sanitized.yml +++ b/.github/workflows/ci-unix-static-sanitized.yml @@ -1,6 +1,8 @@ name: CI Unix Static Sanitized on: push: + branches: + - main pull_request: paths: - '.github/workflows/ci-unix-static-sanitized.yml' diff --git a/.github/workflows/ci-unix-static.yml b/.github/workflows/ci-unix-static.yml index 1ced56fb3f..33425b56bf 100644 --- a/.github/workflows/ci-unix-static.yml +++ b/.github/workflows/ci-unix-static.yml @@ -1,6 +1,8 @@ name: CI Unix Static on: push: + branches: + - main pull_request: paths: - '.github/workflows/ci-unix-static.yml' diff --git a/.github/workflows/ci-windows-installed.yml b/.github/workflows/ci-windows-installed.yml index c372403e74..5b8f9667d6 100644 --- a/.github/workflows/ci-windows-installed.yml +++ b/.github/workflows/ci-windows-installed.yml @@ -5,7 +5,11 @@ # * TODO: use proper installations of libgav1, libsharpyuv and SVT once released. name: CI Windows Installed -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: permissions: contents: read diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 173a0fee53..312f5b2b96 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -13,6 +13,8 @@ name: CI Windows on: push: + branches: + - main pull_request: paths: - '.github/workflows/ci-windows.yml' diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml index 56371f7f50..fb67d1c6b1 100644 --- a/.github/workflows/cifuzz.yml +++ b/.github/workflows/cifuzz.yml @@ -1,6 +1,8 @@ name: CI Fuzz on: push: + branches: + - main pull_request: paths: - '.github/workflows/cifuzz.yml' diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 94aa8ef281..d7c7941f00 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -1,5 +1,9 @@ name: CI Format Check -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: permissions: contents: read