Skip to content

Commit

Permalink
Merge pull request #127 from rogy-AquaLab/fix-paths-filter
Browse files Browse the repository at this point in the history
🔧 Run CI on config change
  • Loading branch information
H1rono authored Apr 11, 2024
2 parents 51c327a + 421d6a0 commit 4dd5bc0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
- 'src/**'
- 'include/**'
- '.github/workflows/main.yml'
format-conf:
- '.clang-format'
lint-conf:
- '.clang-tidy'
docs:
- 'book.toml'
- 'docs/**'
Expand All @@ -46,6 +50,8 @@ jobs:
- '.github/workflows/main.yml'
outputs:
src: ${{ github.ref == 'refs/heads/main' || steps.filter.outputs.src }}
format-conf: ${{ steps.filter.outputs.format-conf }}
lint-conf: ${{ steps.filter.outputs.lint-conf }}
docs: ${{ github.ref == 'refs/heads/main' || steps.filter.outputs.docs }}
examples: ${{ github.ref == 'refs/heads/main' || steps.filter.outputs.examples }}

Expand All @@ -70,7 +76,7 @@ jobs:
clang-format:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.src == 'true' || needs.changes.outputs.examples == 'true' }}
if: ${{ needs.changes.outputs.src == 'true' || needs.changes.outputs.examples == 'true' || needs.changes.outputs.format-conf == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -88,7 +94,7 @@ jobs:
clang-tidy:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.src == 'true' || needs.changes.outputs.examples == 'true' }}
if: ${{ needs.changes.outputs.src == 'true' || needs.changes.outputs.examples == 'true' || needs.changes.outputs.lint-conf == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit 4dd5bc0

Please sign in to comment.