ci: Fix getting PR target branch

This commit is contained in:
Adrian Moennich 2021-04-07 17:32:15 +02:00
parent 0f0740308a
commit a240e284fd

View File

@ -25,7 +25,7 @@ jobs:
if [[ $GITHUB_EVENT_NAME == push ]]; then
upstream_branch="${GITHUB_REF#refs/heads/}"
elif [[ $GITHUB_EVENT_NAME == pull_request ]]; then
upstream_branch="${GITHUB_HEAD_REF#refs/heads/}"
upstream_branch="${GITHUB_BASE_REF#refs/heads/}"
else
echo "unsupported event: $GITHUB_EVENT_NAME"
exit 1
@ -115,7 +115,7 @@ jobs:
if [[ $GITHUB_EVENT_NAME == push ]]; then
upstream_branch="${GITHUB_REF#refs/heads/}"
elif [[ $GITHUB_EVENT_NAME == pull_request ]]; then
upstream_branch="${GITHUB_HEAD_REF#refs/heads/}"
upstream_branch="${GITHUB_BASE_REF#refs/heads/}"
else
echo "unsupported event: $GITHUB_EVENT_NAME"
exit 1