diff mbox series

[ovs-dev,1/2] github: Don't run scheduled workflows on forks.

Message ID 20240729124000.1674930-2-i.maximets@ovn.org
State Accepted
Headers show
Series github: Fixes for workflows on forks. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Ilya Maximets July 29, 2024, 12:39 p.m. UTC
It is annoying to have scheduled workflows running on your own fork,
especially if there are flaky tests or the workflow is broken and
permanently failing for an extended period of time generating an email
for every failure every week.

GitHub doesn't allow to selectively disable triggers, workflow can
only be disabled as a whole, so developers need to keep these failing
workflows running if they want to test their own changes before
submitting patches.

These scheduled workflows have little value on typical forks, i.e. the
ones that are not actual forks with custom code but forks for the
purpose of testing code before sending patches upstream.  Real forks
have code changes already, and they are free to modify the workflows
if they want the scheduled ones.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 .github/workflows/containers.yml               | 1 +
 .github/workflows/ovn-fake-multinode-tests.yml | 1 +
 .github/workflows/ovn-kubernetes.yml           | 1 +
 .github/workflows/test.yml                     | 3 +++
 4 files changed, 6 insertions(+)

Comments

Ilya Maximets July 29, 2024, 6:16 p.m. UTC | #1
On 7/29/24 14:39, Ilya Maximets wrote:
> It is annoying to have scheduled workflows running on your own fork,
> especially if there are flaky tests or the workflow is broken and
> permanently failing for an extended period of time generating an email
> for every failure every week.
> 
> GitHub doesn't allow to selectively disable triggers, workflow can
> only be disabled as a whole, so developers need to keep these failing
> workflows running if they want to test their own changes before
> submitting patches.
> 
> These scheduled workflows have little value on typical forks, i.e. the
> ones that are not actual forks with custom code but forks for the
> purpose of testing code before sending patches upstream.  Real forks
> have code changes already, and they are free to modify the workflows
> if they want the scheduled ones.
> 
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
> ---
>  .github/workflows/containers.yml               | 1 +
>  .github/workflows/ovn-fake-multinode-tests.yml | 1 +
>  .github/workflows/ovn-kubernetes.yml           | 1 +
>  .github/workflows/test.yml                     | 3 +++
>  4 files changed, 6 insertions(+)
> 

Recheck-request: github-robot-_ovn-kubernetes
diff mbox series

Patch

diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml
index 4cce255a8..9c062971e 100644
--- a/.github/workflows/containers.yml
+++ b/.github/workflows/containers.yml
@@ -15,6 +15,7 @@  env:
 
 jobs:
   container:
+    if: github.repository_owner == env.IMAGE_NAMESPACE
     runs-on: ubuntu-24.04
     strategy:
       matrix:
diff --git a/.github/workflows/ovn-fake-multinode-tests.yml b/.github/workflows/ovn-fake-multinode-tests.yml
index b83bfce36..65783b7ae 100644
--- a/.github/workflows/ovn-fake-multinode-tests.yml
+++ b/.github/workflows/ovn-fake-multinode-tests.yml
@@ -13,6 +13,7 @@  concurrency:
 jobs:
   build:
     name: Build ovn-fake-multinode image
+    if: github.repository_owner == 'ovn-org' || github.event_name != 'schedule'
     runs-on: ubuntu-22.04
     strategy:
       matrix:
diff --git a/.github/workflows/ovn-kubernetes.yml b/.github/workflows/ovn-kubernetes.yml
index 0f2b30497..2c80f7951 100644
--- a/.github/workflows/ovn-kubernetes.yml
+++ b/.github/workflows/ovn-kubernetes.yml
@@ -24,6 +24,7 @@  env:
 jobs:
   build:
     name: Build
+    if: github.repository_owner == 'ovn-org' || github.event_name != 'schedule'
     runs-on: ubuntu-22.04
     steps:
     - name: Enable Docker experimental features
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0342c3dcf..f7a184c13 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -25,6 +25,7 @@  jobs:
     env:
       DEPENDENCIES: podman
     name: Prepare container
+    if: github.repository_owner == 'ovn-org' || github.event_name != 'schedule'
     runs-on: ubuntu-24.04
 
     steps:
@@ -186,6 +187,7 @@  jobs:
       OPTS:  --disable-ssl
 
     name:    osx clang --disable-ssl
+    if: github.repository_owner == 'ovn-org' || github.event_name != 'schedule'
     runs-on: macos-latest
 
     strategy:
@@ -240,6 +242,7 @@  jobs:
 
   build-linux-rpm:
     name: linux rpm fedora
+    if: github.repository_owner == 'ovn-org' || github.event_name != 'schedule'
     runs-on: ubuntu-22.04
     container: fedora:40
     timeout-minutes: 30