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 benchmark on forked repo #7034
Conversation
Good idea, but seems like this change also disable benchmark for all PRs, not just forked repo |
Oh, hmmm, would have thought owner applied to the target repo, any ideas how to fix? |
Maybe leave all pull request related fields outside of owner check:
|
Actually, just checking owner on schedule event should be enough, the others are not likely to be triggered in most forks. |
It's pull_target_event for security reason, if you find a better one: |
Anyone knows if it's possible to set an if condition on schedule itself? That would probably be even nicer. |
Sigh, syncing fork counts as a push, so triggers also. The only check usable here seems to be the full repository in
Or, it just occurred to me that the push event is only for the merge, not updating the PR, in which case, checking owner should be fine. |
@CISC Can you try adding something to The condition I'm talking about:
|
I'm not sure I understand? You mean to this PR? Couldn't you just submit a PR to my fork for the same effect (without the (even messier) commit history :) )? |
I'm not very confident to merge without doing any test, so it's up to you to test it out. The way to test that I'm talking about is to trigger benchmark workflow. We don't really care about commit history because PR are squashed anw. |
@ngxson Looks good for PR, but it also triggered benchmark on my fork, not sure why it did that, only thing I can think of triggering it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, let's see if it works :)
I'm trying to debug the if... |
Sigh, I can't get any debug logs from this action as it just hangs waiting for the runner. |
This looks a lot better:
|
Yay, benchmark skipped on fork, queued here! |
All done, looks like it's working now, and should have fixed some previous issues with this condition as well! :) |
Wait, it's a pull request target event. The master file is in used... |
Ah, you mean the event name? Right. |
Alright, this time benchmark is actually running, all good? |
Looking more closely at |
@phymbert Yeah, ok? I'm confused, do I need to do anything special, seems to work now? |
Ok, benchmark is still scheduled on fork, so not quite working. I think it's the According to docs Finally, I guess |
Small note that EditorConfig check failed because it's taking code from master branch. This is not due to this PR, so I'm merging now. Thanks @CISC for the work |
* Disable benchmark on forked repo * only check owner on schedule event * check owner on push also * more readable as multi-line * ternary won't work * style++ * test++ * enable actions debug * test-- * remove debug * test++ * do debug where we can get logs * test-- * this is driving me crazy * correct github.event usage * remove test condition * correct github.event usage * test++ * test-- * event_name is pull_request_target * test++ * test-- * update ref checks
Discovered this while debugging ggerganov#7034 **Warning**: This may change current behavior as all these evaluated to null before!
* Disable benchmark on forked repo * only check owner on schedule event * check owner on push also * more readable as multi-line * ternary won't work * style++ * test++ * enable actions debug * test-- * remove debug * test++ * do debug where we can get logs * test-- * this is driving me crazy * correct github.event usage * remove test condition * correct github.event usage * test++ * test-- * event_name is pull_request_target * test++ * test-- * update ref checks
It's a little annoying to get spammed by failed runs on your forked repo... :)