Skip to content

Bump multer, @nestjs/core, @nestjs/platform-express and @nestjs/testing #7

Bump multer, @nestjs/core, @nestjs/platform-express and @nestjs/testing

Bump multer, @nestjs/core, @nestjs/platform-express and @nestjs/testing #7

Workflow file for this run

name: CI
on:
push:
branches: ['main']
tags: ['v*.*.*']
pull_request:
branches: ['main']
env:
REGISTRY: docker.io
IMAGE_NAME: argentinaluiz/nestjs-app
DOCKER_USERNAME: argentinaluiz
SHA: ${{ github.event.pull_request.head.sha || github.event.after }}
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
pull-requests: write # Permitir criar e atualizar pull requests
security-events: write # Enviar eventos de segurança para o Github Security
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build for CI
id: build-ci
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile.prod
push: false
load: true
target: development
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:ci
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run tests
run: echo "Running tests..."
- name: Build for analysis
id: build-for-analysis
uses: docker/[email protected]
with:
context: ./
file: ./Dockerfile.prod
push: false
load: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Analyze for critical and high CVEs
id: docker-scout-cves
uses: docker/scout-action@v1
with:
command: cves
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.SHA }}
only-severities: critical,high
only-fixed: true
summary: true
exit-code: true
- name: Analyze for all CVEs
id: docker-scout-all-cves
uses: docker/scout-action@v1
with:
command: cves
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.SHA }}
summary: true
sarif-file: sarif.output.json
- name: Upload SARIF result
id: upload-sarif
if: ${{ github.event_name != 'pull_request' }}
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif.output.json
- name: Build final
id: build-final
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
context: ./
file: ./Dockerfile.prod
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: mode=max
sbom: true