From 569da7f6d533d6faea1a08b569d9abb2e0b02ea4 Mon Sep 17 00:00:00 2001 From: John Luo Date: Sun, 3 Dec 2023 19:19:00 -0500 Subject: [PATCH] Try diff with branch names --- .github/actions/post-checkout/action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/post-checkout/action.yml b/.github/actions/post-checkout/action.yml index c3f8300d8..5c06b61e0 100644 --- a/.github/actions/post-checkout/action.yml +++ b/.github/actions/post-checkout/action.yml @@ -8,7 +8,7 @@ runs: - name: Check for documentation only changes id: docs-only run: | - git log --max-count=10 + git log --max-count=10; docs_only="true"; while read filepath; do if [ $filepath == *.md ]; then @@ -17,12 +17,12 @@ runs: echo "${filepath} is a non documentation file"; docs_only="false"; fi; - done < <(git diff --name-only "${GITHUB_BASE_SHA}" "${GITHUB_PR_SHA}"); + done < <(git diff --name-only "${GITHUB_BASE_BRANCH}" "${GITHUB_PR_BRANCH}"); echo "docs_only=${docs_only}" >> $GITHUB_OUTPUT; shell: bash env: - GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha }} - GITHUB_PR_SHA: ${{ github.event.pull_request.head.sha }} + GITHUB_BASE_BRANCH: ${{ github.event.pull_request.base.ref }} + GITHUB_PR_BRANCH: ${{ github.event.pull_request.head.ref }} - name: Get Composer cache directory id: composer-cache