diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34dad0f5c67..f69ea7d7301 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,9 +12,9 @@ on: - reopened branches: - main -# pull_request_review -# branches: -# - main + pull_request_review: + branches: + - main jobs: shellcheck: diff --git a/action.yml b/action.yml index 4f3d923c484..8d3d84ed71a 100644 --- a/action.yml +++ b/action.yml @@ -182,8 +182,8 @@ runs: GITHUB_REPOSITORY: ${{ github.repository }} GITHUB_REF: ${{ github.ref }} GITHUB_SHA: ${{ github.sha }} - GITHUB_BASE_REF: ${{ github.base_ref }} - GITHUB_HEAD_REF: ${{ github.head_ref }} + GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref }} + GITHUB_HEAD_REF: ${{ github.event.pull_request.head.ref }} GITHUB_WORKSPACE: ${{ github.workspace }} GITHUB_EVENT_NUMBER: ${{ github.event.number }} GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }} @@ -226,7 +226,7 @@ runs: shell: bash env: 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 }} # INPUT_ is not available in Composite run steps # https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs diff --git a/diff-sha.sh b/diff-sha.sh index ef02928e56d..f6d337d4992 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -50,6 +50,8 @@ else echo "Valid git version found: ($GIT_VERSION)" fi +echo "Base Ref: $GITHUB_BASE_REF" + if [[ -z $GITHUB_BASE_REF ]]; then echo "Running on a push event..." TARGET_BRANCH=$GITHUB_REFNAME