-
I’m trying to make an action workflow that operates on the The current SHA is easy:
When I have a pull-request event, I can also use But when I push to that branch (e.g. fixing something), then Is there a way to continue to access
But I see that there’s no .git/refs/heads/master when I check out… |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @ghutchis , ‘github.head_ref’ is not supported for push event, since it’s not in the push event github context, you can use below command to check all of the context values:
Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
I think this is a fairly common use case, judging from some of the searching I did. I think push events made to a pull request should be able to fetch their branch point. This doesn’t work robustly, but is close enough for now:
|
Beta Was this translation helpful? Give feedback.
I think this is a fairly common use case, judging from some of the searching I did. I think push events made to a pull request should be able to fetch their branch point.
This doesn’t work robustly, but is close enough for now: