Skip to content

Commit

Permalink
add exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamasato authored Jan 5, 2024
1 parent 4fa90d3 commit 9742423
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/changed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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:
Expand Down

0 comments on commit 9742423

Please sign in to comment.