mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-12 07:01:49 +00:00
ae74cab70a
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
63 lines
1.8 KiB
YAML
63 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Install dependencies
|
|
working-directory: ./ui
|
|
run: npm install
|
|
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
|
- name: Build Container
|
|
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.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
|