Skip to content

Commit

Permalink
attempt fix for dorny/paths-filter#240
Browse files Browse the repository at this point in the history
  • Loading branch information
emma-sg committed Jan 7, 2025
1 parent b86d5e8 commit 60cc7d1
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ansible-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ jobs:
outputs:
matches: ${{ steps.filter.outputs.matches }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # important, to fetch previous commit

# workaround for https://github.com/dorny/paths-filter/issues/240
- id: previous-sha
run: 'echo "sha=$(git rev-list -n 1 ${{ github.ref }}^)" >> $GITHUB_OUTPUT'

- uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
base: "${{ steps.previous-sha.outputs.sha }}"
filters: |
matches:
- 'ansible/**'
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/backend-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ jobs:
outputs:
matches: ${{ steps.filter.outputs.matches }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # important, to fetch previous commit

# workaround for https://github.com/dorny/paths-filter/issues/240
- id: previous-sha
run: 'echo "sha=$(git rev-list -n 1 ${{ github.ref }}^)" >> $GITHUB_OUTPUT'

- uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
base: "${{ steps.previous-sha.outputs.sha }}"
filters: |
matches:
- 'backend/**'
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/frontend-lint-test-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,18 @@ jobs:
outputs:
matches: ${{ steps.filter.outputs.matches }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # important, to fetch previous commit

# workaround for https://github.com/dorny/paths-filter/issues/240
- id: previous-sha
run: 'echo "sha=$(git rev-list -n 1 ${{ github.ref }}^)" >> $GITHUB_OUTPUT'

- uses: dorny/paths-filter@v3
id: filter
with:
base: "${{ steps.previous-sha.outputs.sha }}"
filters: |
matches:
- 'frontend/src/**'
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/k3d-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ jobs:
outputs:
matches: ${{ steps.filter.outputs.matches }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # important, to fetch previous commit

# workaround for https://github.com/dorny/paths-filter/issues/240
- id: previous-sha
run: 'echo "sha=$(git rev-list -n 1 ${{ github.ref }}^)" >> $GITHUB_OUTPUT'

- uses: dorny/paths-filter@v3
id: filter
with:
base: ${{ github.ref }}
base: "${{ steps.previous-sha.outputs.sha }}"
filters: |
matches:
- 'backend/**'
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/weblate-reformat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@ jobs:
outputs:
matches: ${{ steps.filter.outputs.matches }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # important, to fetch previous commit

# workaround for https://github.com/dorny/paths-filter/issues/240
- id: previous-sha
run: 'echo "sha=$(git rev-list -n 1 ${{ github.ref }}^)" >> $GITHUB_OUTPUT'

- uses: dorny/paths-filter@v3
id: filter
with:
base: "${{ steps.previous-sha.outputs.sha }}"
filters: |
matches:
- 'frontend/xliff/**'
Expand Down

0 comments on commit 60cc7d1

Please sign in to comment.