Skip to content

Dpat 2062 moj frontend #26

Dpat 2062 moj frontend

Dpat 2062 moj frontend #26

Workflow file for this run

---
name: Build & Test
on:
pull_request:
branches:
- main
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build Image
id: build_image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with:
push: false
load: true
tags: control-panel
- name: Scan Image
id: scan_image
uses: aquasecurity/trivy-action@2b6a709cf9c4025c5438138008beaddbb02086f0 # v0.14.0
with:
image-ref: control-panel
exit-code: 1
format: sarif
output: trivy-results.sarif
severity: CRITICAL
limit-severities-for-sarif: true
- name: Scan Image (On SARIF Scan Failure)
if: failure() && steps.scan_image.outcome == 'failure'
id: scan_image_on_failure
uses: aquasecurity/trivy-action@2b6a709cf9c4025c5438138008beaddbb02086f0 # v0.14.0
with:
image-ref: control-panel
exit-code: 1
format: table
severity: CRITICAL
- name: Upload SARIF
if: always()
id: upload_sarif
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.2.7
with:
sarif_file: trivy-results.sarif
- name: Run Python tests (docker-compose)
run: |
docker compose --file contrib/docker-compose-test.yml run --rm interfaces
env:
NETWORK: default
IMAGE_TAG: control-panel