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: