Skip to content

Merge pull request #7 from Dipendra2003/dependabot/npm_and_yarn/helme… #62

Merge pull request #7 from Dipendra2003/dependabot/npm_and_yarn/helme…

Merge pull request #7 from Dipendra2003/dependabot/npm_and_yarn/helme… #62

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:
trivy-security-scan:
name: Source Code Security Scan
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
- 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 31 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: 31, Col: 3): Error calling workflow 'Dipendra2003/StudyForge/.github/workflows/reusable-build.yml@afc2b18ec9ba64764bce0c2759cbd7a7ee3b6a34'. The nested job 'build' is requesting 'packages: write', but is only allowed 'packages: read'.
name: Build Image
needs: 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