mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-08-10 08:21:54 +00:00
fix(ci): correctly skip code CI for docs-only PRs (#6800)
dorny/paths-filter treats exclusion-only patterns as matching every non-excluded path under the default "some" quantifier, so docs-only PRs still set code=true. Add an explicit "**" include and use predicate-quantifier: every in tests, type-checker, and linter. Also gate Vulnerability Scan the same way on pull_request while keeping schedule and main push runs unconditional. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Rip&Tear <theCyberTech@users.noreply.github.com>
This commit is contained in:
32
.github/workflows/vulnerability-scan.yml
vendored
32
.github/workflows/vulnerability-scan.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user