diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index f5d3847b5..245ba9fec 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -16,8 +16,13 @@ jobs: - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 id: filter with: + # Exclusion-only patterns match every non-excluded file under the + # default "some" quantifier. Require all patterns (including "**") + # so docs-only / markdown-only PRs correctly set code=false. + predicate-quantifier: every filters: | code: + - '**' - '!docs/**' - '!**/*.md' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 008ac6ccb..1e4d77a60 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,8 +16,13 @@ jobs: - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 id: filter with: + # Exclusion-only patterns match every non-excluded file under the + # default "some" quantifier. Require all patterns (including "**") + # so docs-only / markdown-only PRs correctly set code=false. + predicate-quantifier: every filters: | code: + - '**' - '!docs/**' - '!**/*.md' diff --git a/.github/workflows/type-checker.yml b/.github/workflows/type-checker.yml index d60cb4f95..a9088381b 100644 --- a/.github/workflows/type-checker.yml +++ b/.github/workflows/type-checker.yml @@ -16,8 +16,13 @@ jobs: - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 id: filter with: + # Exclusion-only patterns match every non-excluded file under the + # default "some" quantifier. Require all patterns (including "**") + # so docs-only / markdown-only PRs correctly set code=false. + predicate-quantifier: every filters: | code: + - '**' - '!docs/**' - '!**/*.md' diff --git a/.github/workflows/vulnerability-scan.yml b/.github/workflows/vulnerability-scan.yml index bfb3c1db1..2f9834edc 100644 --- a/.github/workflows/vulnerability-scan.yml +++ b/.github/workflows/vulnerability-scan.yml @@ -12,8 +12,40 @@ permissions: contents: read jobs: + changes: + name: Detect changes + runs-on: ubuntu-latest + outputs: + code: ${{ steps.set.outputs.code }} + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + if: github.event_name == 'pull_request' + - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 + id: filter + if: github.event_name == 'pull_request' + with: + # Exclusion-only patterns match every non-excluded file under the + # default "some" quantifier. Require all patterns (including "**") + # so docs-only / markdown-only PRs correctly set code=false. + predicate-quantifier: every + filters: | + code: + - '**' + - '!docs/**' + - '!**/*.md' + - name: Set code output + id: set + run: | + if [ "${{ github.event_name }}" != "pull_request" ]; then + echo "code=true" >> "$GITHUB_OUTPUT" + else + echo "code=${{ steps.filter.outputs.code }}" >> "$GITHUB_OUTPUT" + fi + pip-audit: name: pip-audit + needs: changes + if: needs.changes.outputs.code == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1