Update action.yml

This commit is contained in:
Tonye Jack 2023-05-15 14:19:01 -06:00 committed by GitHub
parent 19dc24d374
commit 4d9f7b7bce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ runs:
# "Set branch names..."
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
BASE_REF=$(printf "%q" "${{ github.base_ref }}")
HEAD_REF=$(printf "%q" "${{ github.head_ref }}")
HEAD_REF=$(printf "%q" "${{ github.event.pull_request.head.ref || github.head_ref }}")
REF=$(printf "%q" "${{ github.ref }}")
BASE_REF=${BASE_REF/refs\/heads\//}
@ -75,9 +75,9 @@ runs:
if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
if [[ ${{ github.event_name }} == *"pull_request"* ]]; then
if [[ -z "$GITHUB_OUTPUT" ]]; then
echo "::set-output name=current_branch::${{ github.event.pull_request.head.ref }}"
echo "::set-output name=current_branch::${{ steps.branch.outputs.head_ref }}"
else
echo "current_branch=${{ github.event.pull_request.head.ref }}" >> "$GITHUB_OUTPUT"
echo "current_branch=${{ steps.branch.outputs.head_ref }}" >> "$GITHUB_OUTPUT"
fi
else
if [[ -z "$GITHUB_OUTPUT" ]]; then