Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,61 +81,6 @@ jobs:
...
```

### Configure the workflow: `tj-actions/changed-files`

This action accepts only JSON inputs. Please set `json: true` and `escape_json: false`.


```yaml
name: Filter paths and group by
on:
pull_request:

jobs:
paths:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
timeout-minutes: 5
outputs:
directories: ${{ steps.group-by.outputs.directories }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get changed files
id: changed
uses: tj-actions/changed-files@v45
with:
skip_initial_fetch: true
json: true
escape_json: false
files: |
docker/**
- name: Group by
uses: tapihdev/paths-group-by@v0
id: group-by
with:
paths: ${{ steps.changed.outputs.all_modified_files }}
glob: docker/*/*

matrix:
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 5
strategy:
matrix:
directory: ${{fromJson(needs.paths.outputs.directories)}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: ${{ matrix.directory }}
- name: Do something
...
```

### Inputs

| **Input** | **Required** | **Description** |
Expand Down