Skip to content

Commit

Permalink
Try diff with branch names
Browse files Browse the repository at this point in the history
  • Loading branch information
JunTaoLuo committed Dec 4, 2023
1 parent 4d203ba commit 569da7f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/actions/post-checkout/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 569da7f

Please sign in to comment.