fix: update vulnerable runtime dependencies #271
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| quality: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:17-alpine | |
| env: | |
| POSTGRES_DB: sevo | |
| POSTGRES_PASSWORD: sevo_local | |
| POSTGRES_USER: sevo | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U sevo -d sevo" | |
| --health-interval 5s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| env: | |
| CI: true | |
| DATABASE_URL: postgresql://sevo:sevo_local@localhost:5432/sevo | |
| NODE_ENV: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 11.19.0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| - name: Start MinIO integration service | |
| run: | | |
| docker run --detach --name sevo-ci-minio \ | |
| --publish 9100:9000 \ | |
| --env MINIO_ROOT_USER=sevo_local \ | |
| --env MINIO_ROOT_PASSWORD=sevo_local_password \ | |
| minio/minio:RELEASE.2025-04-22T22-12-26Z server /data | |
| for attempt in {1..30}; do | |
| if curl --fail --silent http://localhost:9100/minio/health/live; then | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| docker logs sevo-ci-minio | |
| exit 1 | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm audit --prod | |
| - run: pnpm quality | |
| - run: pnpm build | |
| - run: pnpm exec playwright install --with-deps chromium | |
| - name: Run Playwright acceptance and visual regression | |
| id: playwright | |
| run: pnpm test:e2e | |
| - name: Upload Playwright failure artifacts | |
| if: failure() && steps.playwright.outcome == 'failure' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-failure-${{ github.run_id }} | |
| path: | | |
| output/playwright-report | |
| output/playwright-results | |
| if-no-files-found: error | |
| retention-days: 14 | |
| container-images: | |
| needs: quality | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: api | |
| dockerfile: apps/api/Dockerfile | |
| - name: web | |
| dockerfile: apps/web/Dockerfile | |
| - name: worker | |
| dockerfile: apps/worker/Dockerfile | |
| - name: migrate | |
| dockerfile: packages/database/Dockerfile | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v4 | |
| - name: Build ${{ matrix.name }} image from the production Dockerfile | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ${{ matrix.dockerfile }} | |
| load: true | |
| tags: sevo-${{ matrix.name }}:${{ github.sha }} | |
| cache-from: type=gha,scope=${{ matrix.name }} | |
| cache-to: type=gha,mode=max,scope=${{ matrix.name }} | |
| - name: Block fixed high or critical image vulnerabilities | |
| run: >- | |
| docker run --rm | |
| -v /var/run/docker.sock:/var/run/docker.sock | |
| aquasec/trivy:0.72.0@sha256:cffe3f5161a47a6823fbd23d985795b3ed72a4c806da4c4df16266c02accdd6f | |
| image | |
| --db-repository ghcr.io/aquasecurity/trivy-db:2 | |
| --severity HIGH,CRITICAL | |
| --ignore-unfixed | |
| --exit-code 1 | |
| sevo-${{ matrix.name }}:${{ github.sha }} |