Skip to content

Commit

Permalink
Test doc file filter
Browse files Browse the repository at this point in the history
  • Loading branch information
JunTaoLuo committed Dec 3, 2023
1 parent de9e1e5 commit 1c35041
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
14 changes: 14 additions & 0 deletions .github/actions/post-checkout/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ runs:
using: "composite"
steps:

- name: Check for documentation only changes
id: docs-only
run: |
docs_only="true";
while read filepath; do
if [ $filepath == *.md ]; then
echo "${filepath} is a documentation file";
else
echo "${filepath} is a non documentation file";
docs_only="false";
fi;
done << (git diff --name-only "${GITHUB_BASE_SHA}" "${GITHUB_PR_SHA}");
echo "docs_only=${docs_only}" >> $GITHUB_OUTPUT;
- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Continuous Integration
on:
pull_request:
paths-ignore:
- '**.md'
on: [pull_request]
jobs:

# Check whether certain fields exist in the CMS configuration.
Expand Down

0 comments on commit 1c35041

Please sign in to comment.