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

Difficulty level
Unknown (require assessment)
Version
Current
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Improvement (missing useful functionality)