-
Notifications
You must be signed in to change notification settings - Fork 331
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
Cron GitHub Actions workflows execute on forks #10235
Comments
Quarto has no control over forks. You are the owner of a fork. |
@mcanouil I want to use GitHub actions, just not on a cron basis. Quarto does have control over forks, and it exercises it as below:
However, it only exercises this technique on one workflow instead of all workflows. Can this please be applied to all workflows that use |
Again, user enables or not the workflows to run. You can disable the workflow on your fork if you don't want one in particular and want the others for some reasons. What you are showing in the workflow is completely unrelated to the current matter. |
Can you explain how it's unrelated? That conditional is enabling the workflow to run if the event triggering it is not a "schedule" event (i.e. cron) OR the event is "schedule" and is running on the current repository. The 2nd half of the OR would evaluate to false for a cron event on a fork. |
Thanks for updating your post with further explanation. The purpose of the condition is exactly the solve the problem I am opening this issue to report! When the repository name is not "quarto-dev/quarto-cli", the repository is a fork. Running cron workflows on all Quarto's forks, and please keep in mind there are 293 at this point, is expending a non-trivial amount of energy. It is responsible, even if rare, to avoid it, IMO. But given that this repository is already doing it in one place, I wouldn't call it "rare" myself :) |
By default, actions are disabled on fork (unless GitHub changed that recently) The workflows are there to tests many things for Quarto to work. |
Take for example: https://github.com/mfisher87/quarto-feedstock Should the upstream repository also hardcode its repository name in the workflows to forbid users forking the repository to run them? |
I don't think you're understanding me. I do not want to disable GitHub Actions for my fork. I do not want to disable any workflows on my fork. I want them to not be triggered by cron. There are 293 forks of Quarto running cron workflows every day, and I am pointing out that this is very wasteful and that you can easily prevent that without any of those users needing to take action. You've already done it on one workflow, so you can do it again by copying and pasting that. I don't think I've had this much difficulty communicating with this project before, and I apologize if I'm being unclear or misunderstanding you in some way, but at this point I feel we're talking past each other about different things. @cderv @dragonstyle would you be able to help clear up this misunderstanding? |
Ok, I understand your issue. Note that your statement about 293 running actions is wrong. |
I will absolutely concede that some of the 293 forks have disabled GitHub Actions, but that's not the issue I'm trying to address here. I'm not here to argue. |
Only a few enabled the workflows on their fork (not the other way around as the default is not to activate actions on fork exactly for the reason you exposed, i.e., activating actions on forks is a waste of resources most of the time). Anyhow, I made a PR, but in the end I am not the one that is going to decide to merge it or not. |
Thank you for being open to this request and for opening a PR! At the risk of "beating a dead horse", and I apologize in advance if this comes across that way, but I understand that the default for forks is that Actions are disabled, and I agree that's a good thing! However, when I fork something, it's because I want to contribute, and when I want to contribute, I want to make sure my tests pass and stuff before I open a PR on the upstream repo, because I don't want to burden the maintainers with stuff that doesn't meet their quality standards. I can empathize with needing a good signal/noise ratio, as I maintain some stuff too! So the first thing I do when I fork, and I suspect many contributors would do, is enable Actions and get to work. None of this is meant as a criticism, I'm just trying to share my pattern of work. |
FYI, In the case of Quarto (and many other softwares), you don't need CI/CD. (Running tests locally before making a PR is by far less wasteful on resources and with a way lower carbon footprint than running CI/CD on a fork that is going to be triggered also on the PR) |
I agree! I personally like to use pre-commit or pre-push hooks on my projects so I don't have to remember it, and run CI checks on PRs (I don't want to add a variable and start talking about CD 😆). But I do often trust an unfamiliar project's CI configuration to fill in for my lack of knowledge and help me know when I missed something important :) |
@mfisher87 changes have been merged. |
Thanks all for your help addressing this! 🌳 🌲 🌴 ❤️ |
Bug description
Cron workflows are running on forks! It's a bit spammy and wasteful.
I went to submit the fix as a PR but saw I needed to sign a CLA, and I don't have time for it :(
Feel free to copy from my PR on my fork, as I Just copied code from another workflow in this repo anyway 😆 mfisher87#1
Steps to reproduce
Fork this repository.
Expected behavior
No actions run when I'm not actively working on / pushing to my fork
Actual behavior
Actions run and I get notifications and energy is wasted
Your environment
No response
Quarto check output
N/A
The text was updated successfully, but these errors were encountered: