diff --git a/.github/workflows/check-base-branch.yml b/.github/workflows/check-base-branch.yml index ea7c9c9..972844f 100644 --- a/.github/workflows/check-base-branch.yml +++ b/.github/workflows/check-base-branch.yml @@ -16,10 +16,4 @@ jobs: - name: Check base branch run: | git fetch origin - BASE_BRANCH=$(git rev-parse origin/${{ github.event.pull_request.base.ref }}) - CURRENT_BRANCH=$(git rev-parse HEAD) - - if ! git merge-base --is-ancestor $BASE_BRANCH $CURRENT_BRANCH; then - echo "ERROR: The branch is not based off the latest version of the target branch." - exit 1 - fi \ No newline at end of file + git merge-base --is-ancestor ${GITHUB_HEAD_REF} ${GITHUB_BASE_REF} || (echo "ERROR: The branch is not based off the latest version of the target branch." && exit 1) \ No newline at end of file