From 1c35041c8ddcc693d4b364ea8b65d3ab8a06454d Mon Sep 17 00:00:00 2001 From: John Luo Date: Sun, 3 Dec 2023 18:27:53 -0500 Subject: [PATCH] Test doc file filter --- .github/actions/post-checkout/action.yml | 14 ++++++++++++++ .github/workflows/continuous_integration.yml | 5 +---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/actions/post-checkout/action.yml b/.github/actions/post-checkout/action.yml index 6f4d8b248..a43ad01e8 100644 --- a/.github/actions/post-checkout/action.yml +++ b/.github/actions/post-checkout/action.yml @@ -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 diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index be1f6cd1f..06f574234 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -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.