Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable cron for forks #383

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Oct 29, 2024

Only run the scheduled cron for upstream:

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

This is a big CI matrix, we don't need to run the cron on forks, but contributors might nevertheless want run the CI before opening a PR (and clogging up the upstream CI queue).


Background: when pushing stuff to other repos, I was wondering why it was taking a long time for jobs to get a runner, but only in the afternoon, and for two or three hours.

After checking it's not a GitHub outage, I figured out it must be a cron from another repo I'd forked. But not so easy to find when you have over 1,000 forks! So I wrote a script to call the gh CLI to find which repo currently had a running CI, and surprise, surprise, it was this big 'un! :D

(As it happens, I got to use the same script a few days later to find another running in the morning!)

@zanieb
Copy link
Member

zanieb commented Oct 29, 2024

Thanks! This makes sense to me. I feel like we could also just disable the scheduled jobs entirely as I don't really use them in any way.

@zanieb zanieb merged commit 55787ea into astral-sh:main Oct 29, 2024
@hugovk hugovk deleted the disable-cron-for-forks branch October 29, 2024 13:33
@hugovk hugovk mentioned this pull request Oct 29, 2024
@hugovk
Copy link
Contributor Author

hugovk commented Oct 29, 2024

Okay, here we go! #384

zanieb added a commit that referenced this pull request Oct 29, 2024
* Revert "Disable cron for forks (#383)"

This reverts commit 55787ea.

* Disable cron schedule

---------

Co-authored-by: Zanie Blue <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants