Skip to content

- build red-app

- build red-app #1

Workflow file for this run

name: Build Red App
env:
REGISTRY: ghcr.io
IMAGE_NAME: ubaid4j/multiple-apps-routing/red-app
VERSION: 0.0.1-SNAPSHOT
on:
push:
paths:
- 'red-app/**'
branches:
- main
defaults:
run:
working-directory: ./api-gateway
jobs:
package:
name: Package and Publish
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
security-events: write
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Build Container Image
run: |
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} .
- name: OCI Image vulnerability scanning
uses: anchore/scan-action@v3
id: scan
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
fail-build: true
only-fixed: true
severity-cutoff: critical
- name: Upload vulnerability report
uses: github/codeql-action/upload-sarif@v3
if: success()
with:
sarif_file: ${{ steps.scan.outputs.sarif }}
- name: Login to container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish container image
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}