Skip to content

Commit

Permalink
Replace tj-actions/changed-files with dorny/paths-filter (#189)
Browse files Browse the repository at this point in the history
These actions both perform the same function.  However
dorny/paths-filter has much more usage within the Teleport organization
and it is better to have one dependency instead of two.
  • Loading branch information
wadells authored Dec 4, 2023
1 parent ef51fd6 commit ac1012d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/csv-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
fetch-depth: 2

- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
id: filter
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
with:
files: |
**/*.csv
filters: |
csv:
- '**/*.csv'
- name: Setup Go
uses: actions/setup-go@v4
Expand All @@ -36,10 +37,10 @@ jobs:
path: csvlint

- name: csvlint
if: steps.changed-files.outputs.any_changed == 'true'
if: steps.filter.outputs.csv == 'true'
run: |
cd csvlint
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
for file in ${{ steps.filter.outputs.csv_files }}; do
echo "Validating ${file}"
go run cmd/csvlint/main.go ../${file}
done
13 changes: 7 additions & 6 deletions .github/workflows/json-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ jobs:
fetch-depth: 2

- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
id: filter
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
with:
files: |
**/*.json
filters: |
json:
- '**/*.json'
- name: jsonlint
if: steps.changed-files.outputs.any_changed == 'true'
if: steps.filter.outputs.json == 'true'
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
for file in ${{ steps.filter.outputs.json_files }}; do
echo "Validating ${file}"
jq empty ${file}
done

0 comments on commit ac1012d

Please sign in to comment.