From 9742423dd94ad12a0a64bb015a77825a025301ad Mon Sep 17 00:00:00 2001 From: Naka Masato Date: Fri, 5 Jan 2024 10:45:27 +0900 Subject: [PATCH] add exclude --- .github/workflows/changed-files.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changed-files.yml b/.github/workflows/changed-files.yml index 57927eed..550d7dfb 100644 --- a/.github/workflows/changed-files.yml +++ b/.github/workflows/changed-files.yml @@ -2,6 +2,9 @@ name: changed-files on: pull_request: +env: + LOCAL_DIR_FOR_SYNC: check-change + jobs: changes-in-ga-steps: runs-on: ubuntu-latest @@ -52,10 +55,10 @@ jobs: uses: tj-actions/changed-files@v41 with: dir_names: true - dir_names_max_depth: 2 # e.g. check-change/app + dir_names_max_depth: 2 # e.g. check-change/test-2 json: true escape_json: false - files: 'check-change/**' + files: "${{ env.LOCAL_DIR_FOR_SYNC }}/**" files_ignore: '**/README.md' # Reference: https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml @@ -69,6 +72,8 @@ jobs: strategy: matrix: dir: ${{ fromJson(needs.get-changed-dirs.outputs.changed_dirs) }} + exclude: # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixexclude + - dir: check-change # exclude the parent dir (you can't use ${{ env.LOCAL_DIR_FOR_SYNC }} in matrix) needs: - get-changed-dirs steps: