fix: bug running on pull_request_review (#915)

This commit is contained in:
Tonye Jack 2023-01-01 11:39:47 -07:00 committed by GitHub
parent 4ca6f666de
commit dbfd5e10a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -12,9 +12,9 @@ on:
- reopened - reopened
branches: branches:
- main - main
# pull_request_review pull_request_review:
# branches: branches:
# - main - main
jobs: jobs:
shellcheck: shellcheck:

View File

@ -182,8 +182,8 @@ runs:
GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_REF: ${{ github.ref }} GITHUB_REF: ${{ github.ref }}
GITHUB_SHA: ${{ github.sha }} GITHUB_SHA: ${{ github.sha }}
GITHUB_BASE_REF: ${{ github.base_ref }} GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }} GITHUB_HEAD_REF: ${{ github.event.pull_request.head.ref }}
GITHUB_WORKSPACE: ${{ github.workspace }} GITHUB_WORKSPACE: ${{ github.workspace }}
GITHUB_EVENT_NUMBER: ${{ github.event.number }} GITHUB_EVENT_NUMBER: ${{ github.event.number }}
GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }} GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
@ -226,7 +226,7 @@ runs:
shell: bash shell: bash
env: env:
GITHUB_WORKSPACE: ${{ github.workspace }} GITHUB_WORKSPACE: ${{ github.workspace }}
GITHUB_BASE_REF: ${{ github.base_ref }} GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref }}
GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }} GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
# INPUT_<VARIABLE_NAME> is not available in Composite run steps # INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs # https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs

View File

@ -50,6 +50,8 @@ else
echo "Valid git version found: ($GIT_VERSION)" echo "Valid git version found: ($GIT_VERSION)"
fi fi
echo "Base Ref: $GITHUB_BASE_REF"
if [[ -z $GITHUB_BASE_REF ]]; then if [[ -z $GITHUB_BASE_REF ]]; then
echo "Running on a push event..." echo "Running on a push event..."
TARGET_BRANCH=$GITHUB_REFNAME TARGET_BRANCH=$GITHUB_REFNAME