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
Do not run GitHub Action Workflows on fork of example repository #3539
Comments
Hi @readywater, that is definitely not intended from our side. Sorry. We use Github Actions to run automation on the examples repository so it is always up to date with our latest development version of Prisma, and automatically run a large suite of integration tests. We did unfortunately not anticipate that this would also run in user forks of this repository, so never thought about how to avoid that. The developers that built this automation are now already looking into how to avoid this in the future. To make sure you do not get any more costs or lose more quota, best remove the workflows for your fork in the Please also contact me at piotrowski@prisma.io for reimbursement of the GH Actions cost that you would now possible get because these Actions runs used up your quota. |
Seems there is no built in option to disable Github Actions workflows for forks automatically on Github. So the most promising option for us it to a) either completely change how we run our "update Prisma dependencies" workflows (and possibly put them in a separate repository, bot or even CI provider or b) adapt our workflows to only be run in the |
One option might be to put a condition on each job |
While experimenting with something else, I got this message on a repository fork that had already included GitHub Actions workflow files: Did you get the same error message @readywater? That would mean that most users will look at the workflow definitions and we can possibly also add a README there or a comment in the workflow file to make this more prominent and include instructions to delete the update workflow. |
@chrispat Thanks, but this doesn't seem to work: prisma/prisma-examples#1999. Am I doing something wrong? I tried |
You are right it is github.repository_owner. We do not currently support the if condition on the workflow level so you would need to put it on each job. |
@chrispat Actually it works! I actually meant job, not workflow. The reason it didn't work was that we weren't using quotes though, so |
The autoblack job is an occasional cleanup job. If it runs on forks and those PRs are accepted the git history will be weird and that doesn't help anyone. The way to make the job not run on forks is a little non-obvious but based on this thread. prisma/prisma#3539
Problem
I started a new Prisma project to test out Prisma2 by building on this example. As I was working on the project, I started getting Github Action errors saying that my allotted actions were being used up — within a few days hitting 100%. I hadn't realized it but Prisma was creating a bunch of actions that were running almost constantly.
I'm not sure where in the documentation this lives, but since it impacts a paid feature on Github (and sucked my resources dry so quickly), this should probably be flagged at some point during the database initialization phase. I've searched through the documentation for this, but wasn't able to find it using the action names and similar.
Suggested solution
Additional context
A buddy works on the Github Actions team, so I'll be chatting with him about this next week (as well as passing on this issue) to see if he has any suggestions.
The text was updated successfully, but these errors were encountered: