Skip to content

[Snyk] Security upgrade react-scripts from 3.4.1 to 5.0.0 #88

[Snyk] Security upgrade react-scripts from 3.4.1 to 5.0.0

[Snyk] Security upgrade react-scripts from 3.4.1 to 5.0.0 #88

name: Build crAPI web service
on:
pull_request:
paths:
- '.github/workflows/build-and-release-crapi-web.yml'
- 'crAPI/services/web/**'
push:
paths:
- '.github/workflows/build-and-release-crapi-web.yml'
- 'crAPI/services/web/**'
branches:
- main
tags:
- v*
workflow_dispatch:
jobs:
build-and-push-image:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build image
if: ${{ github.event_name == 'pull_request' || github.ref != 'refs/heads/main' }}
uses: docker/build-push-action@v5
with:
context: ./crAPI/services/web
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: levoai/crapi-web:pr-build
- name: Build and push
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@v5
with:
context: ./crAPI/services/web
platforms: linux/amd64,linux/arm64
push: true
tags: levoai/crapi-web:latest
cache-from: type=gha
cache-to: type=gha,mode=max