chore: revert files ignore action removal (#9071)

Co-authored-by: César Arroba <19954079+cesararroba@users.noreply.github.com>
This commit is contained in:
Prowler BotandCésar Arroba authored and GitHub committed 2025-10-29 15:28:01 +01:00
1 parent cd48708f27
commit 64efd09918
4 files changed
+228 -55

No files matched your search

+40 -13
View File
@@ -6,21 +6,15 @@ on:
- 'master'
- 'v5.*'
paths:
- '.github/workflows/api-pull-request.yml'
- 'api/**'
- '!api/docs/**'
- '!api/README.md'
- '!api/CHANGELOG.md'
- '.github/workflows/api-pull-request.yml'
pull_request:
branches:
- 'master'
- 'v5.*'
paths:
- '.github/workflows/api-pull-request.yml'
- 'api/**'
- '!api/docs/**'
- '!api/README.md'
- '!api/CHANGELOG.md'
- '.github/workflows/api-pull-request.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -41,9 +35,38 @@ env:
IMAGE_NAME: prowler-api
jobs:
code-quality:
check-changes:
if: github.repository == 'prowler-cloud/prowler'
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
api-changed: ${{ steps.filter.outputs.api }}
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Check for API changes
id: filter
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
with:
files_ignore: |
api/docs/**
api/README.md
api/CHANGELOG.md
- name: Set output
id: set-output
run: |
if [[ "${{ steps.filter.outputs.any_changed }}" == "true" ]]; then
echo "api=true" >> $GITHUB_OUTPUT
else
echo "api=false" >> $GITHUB_OUTPUT
fi
code-quality:
needs: check-changes
if: github.repository == 'prowler-cloud/prowler' && needs.check-changes.outputs.api-changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
@@ -78,7 +101,8 @@ jobs:
run: poetry run pylint --disable=W,C,R,E -j 0 -rn -sn src/
security-scans:
if: github.repository == 'prowler-cloud/prowler'
needs: check-changes
if: github.repository == 'prowler-cloud/prowler' && needs.check-changes.outputs.api-changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
@@ -113,7 +137,8 @@ jobs:
run: poetry run vulture --exclude "contrib,tests,conftest.py" --min-confidence 100 .
tests:
if: github.repository == 'prowler-cloud/prowler'
needs: check-changes
if: github.repository == 'prowler-cloud/prowler' && needs.check-changes.outputs.api-changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
@@ -177,7 +202,8 @@ jobs:
flags: api
dockerfile-lint:
if: github.repository == 'prowler-cloud/prowler'
needs: check-changes
if: github.repository == 'prowler-cloud/prowler' && needs.check-changes.outputs.api-changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
@@ -194,7 +220,8 @@ jobs:
ignore: DL3013
container-build-and-scan:
if: github.repository == 'prowler-cloud/prowler'
needs: check-changes
if: github.repository == 'prowler-cloud/prowler' && needs.check-changes.outputs.api-changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
permissions: