I'm trying to set up a Github action push event to master (so, a merge). The problem is that for what I want to do, I need the name of the original pull request branch. The Github pull request event makes this easy by calling ${{ github.head_ref }}
, but this option doesn't exist on a push event. I originally thought ${{ github.head }}
would give me what I want, but it actually just gives me refs/heads/master
, not the name of the original PR branch.
In other words, say I opened a PR to the master branch with a branch named foo
. In a push event, I want to be able to get foo
for what I want to do in the job.
Is this possible?