mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-04-12 20:58:41 +00:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: UI - Pull Request
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "master"
|
|
- "v5.*"
|
|
paths:
|
|
- ".github/workflows/ui-pull-request.yml"
|
|
- "ui/**"
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- "v5.*"
|
|
paths:
|
|
- 'ui/**'
|
|
env:
|
|
UI_WORKING_DIR: ./ui
|
|
IMAGE_NAME: prowler-ui
|
|
|
|
jobs:
|
|
test-and-coverage:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
node-version: [20.x]
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
cache-dependency-path: './ui/package-lock.json'
|
|
- name: Install dependencies
|
|
working-directory: ./ui
|
|
run: npm ci
|
|
- name: Run Healthcheck
|
|
working-directory: ./ui
|
|
run: npm run healthcheck
|
|
- name: Build the application
|
|
working-directory: ./ui
|
|
run: npm run build
|
|
|
|
test-container-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
|
- name: Build Container
|
|
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
|
with:
|
|
context: ${{ env.UI_WORKING_DIR }}
|
|
# Always build using `prod` target
|
|
target: prod
|
|
push: false
|
|
tags: ${{ env.IMAGE_NAME }}:latest
|
|
outputs: type=docker
|
|
build-args: |
|
|
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51LwpXXXX
|