Page MenuHomeVyOS Platform

Workflow action in github spams forks
Open, NormalPublicBUG

Description

When forking any of the projects from https://github.com/vyos you will end up with failed workflow actions in your mailbox which is kind of annoying.

Not only for the emails themselves but also that stuff tries to run with your own github-account (CodeQL etc).

There is a global setting to disable these status emails however that will also kill any other emails sent by github.

I found this workaround which I hope the workflow actions setup by VyOS-team can be adjusted for?

https://dev.to/hugovk/til-how-to-disable-cron-for-github-forks-2d0l

Also anyone in here who might have other workarounds?

I have tried to disable specific workflow actions but once VyOS-team adds a new that seems to be enabled by default (and the spamming returns)!?

Examples from above link:

Instead, we only need to run the cron for the upstream. For example, for a https://github.com/octocat/hello-world repo, add:

 jobs:
   test:
+    if: ${{ github.repository_owner == 'octocat' || github.event_name != 'schedule' }}
     runs-on: ubuntu-latest

Also

For simpler workflows that only trigger on a cron, such as stalebot or CodeQL runs, we can add a simpler condition.

We can completely disable it for forks:

 jobs:
   stale:
+    if: github.repository_owner == 'octocat'
     runs-on: ubuntu-latest

Details

Version
Current
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

Viacheslav triaged this task as Normal priority.Aug 1 2024, 12:19 PM

2026-07-05 triage: keeping open, re-scoped. Since this was filed, most per-repo GHA was retired in favor of central Mergify automation (T8937), which shrank the fork-spam surface — but scheduled/cron workflows (e.g. CodeQL callers) still run on forks where jobs lack an owner guard. Remaining work = a fleet sweep adding if: github.repository_owner == 'vyos' (or the schedule-conditional variant) to jobs in scheduled workflows. Small, bounded; will be scheduled as an owner-guard sweep work item.