feat: env keys behavior updated (#8348)

This commit is contained in:
Alejandro Bailo
2025-07-23 10:44:28 +02:00
committed by GitHub
parent 3840e40870
commit 676cc44fe2
3 changed files with 13 additions and 4 deletions

View File

@@ -53,16 +53,20 @@ jobs:
AUTH_TRUST_HOST: true
NEXTAUTH_URL: http://localhost:3000
PROWLER_API_PORT: 8080
NEXT_PUBLIC_API_BASE_URL: http://localhost:8080/api/v1
NEXT_PUBLIC_API_BASE_URL: ${{ secrets.API_BASE_URL || 'http://localhost:8080/api/v1' }}
E2E_USER: ${{ secrets.E2E_USER }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Start needed services with docker compose
if: github.repository == 'prowler-cloud/prowler'
run: |
docker compose up -d api worker worker-beat
- name: Wait for prowler-api to respond
if: github.repository == 'prowler-cloud/prowler'
run: |
echo "Waiting for prowler-api..."
for i in {1..30}; do
@@ -74,6 +78,7 @@ jobs:
sleep 3
done
- name: Run database migrations
if: github.repository == 'prowler-cloud/prowler'
run: |
echo "Running Django migrations..."
docker compose exec -T api sh -c '
@@ -81,9 +86,11 @@ jobs:
'
echo "Database migrations completed!"
- name: Copy local fixtures into API container
if: github.repository == 'prowler-cloud/prowler'
run: |
docker cp ./api/src/backend/api/fixtures/dev/. prowler-api-1:/home/prowler/backend/api/fixtures/dev
- name: Load database fixtures for e2e tests
if: github.repository == 'prowler-cloud/prowler'
run: |
docker compose exec -T api sh -c '
echo "Loading all fixtures from api/fixtures/dev/..."
@@ -131,7 +138,7 @@ jobs:
retention-days: 30
- name: Cleanup services
if: always()
if: github.repository == 'prowler-cloud/prowler'
run: |
echo "Shutting down services..."
docker-compose down -v || true