Skip to content

feat: implement database module with PostgreSQL and Redis initializat… #134

feat: implement database module with PostgreSQL and Redis initializat…

feat: implement database module with PostgreSQL and Redis initializat… #134

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Enterprise CI/CD Pipeline

Invalid workflow file

The workflow is not valid. .github/workflows/main-ci-cd.yml (Line: 55, Col: 3): Error calling workflow 'Dipendra2003/StudyForge/.github/workflows/reusable-build.yml@4686fc942e38416395a9bdd6afbfebc989cbf666'. The nested job 'build' is requesting 'packages: write', but is only allowed 'packages: read'.
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