feat: implement database module with PostgreSQL and Redis initializat… #134
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: Enterprise CI/CD Pipeline | ||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| workflow_dispatch: | ||
| env: | ||
| IMAGE_NAME: ${{ github.repository }} | ||
| jobs: | ||
| test-and-lint: | ||
| name: Test & Type Check | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v7 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: 'npm' | ||
| - name: Install Dependencies | ||
| run: npm ci --legacy-peer-deps | ||
| - name: Run TypeScript Type Check | ||
| run: npm run check | ||
| - name: Run Automated Test Suite | ||
| run: npm test | ||
| trivy-security-scan: | ||
| name: Source Code Security Scan | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v7 | ||
| - name: Run Trivy vulnerability scanner | ||
| uses: aquasecurity/trivy-action@master | ||
| with: | ||
| scan-type: 'fs' | ||
| ignore-unfixed: true | ||
| format: 'table' | ||
| severity: 'CRITICAL,HIGH' | ||
| call-build: | ||
|
Check failure on line 55 in .github/workflows/main-ci-cd.yml
|
||
| name: Build Image | ||
| needs: [test-and-lint, trivy-security-scan] | ||
| uses: ./.github/workflows/reusable-build.yml | ||
| with: | ||
| image-name: ${{ github.repository }} | ||
| push: ${{ github.event_name != 'pull_request' }} | ||
| secrets: inherit | ||
| call-deploy-production: | ||
| name: Deploy to Production | ||
| needs: call-build | ||
| # Only deploy on pushes to main, not on PRs | ||
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | ||
| uses: ./.github/workflows/reusable-deploy.yml | ||
| with: | ||
| environment: production | ||
| image-name: ${{ github.repository }} | ||
| image_tag: ${{ needs.call-build.outputs.image_tag }} | ||
| secrets: inherit | ||