-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.75 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build
env:
version: $(date +%s)
on:
push:
branches: [ "master" ]
jobs:
build-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build -f apiserver/apiserver.dockerfile --tag registry.ohrenpirat.de:5000/mwildt/dependency-track-apiserver:latest apiserver
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'registry.ohrenpirat.de:5000/mwildt/dependency-track-apiserver:latest'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Create Trivy sbom
uses: aquasecurity/trivy-action@master
with:
image-ref: 'registry.ohrenpirat.de:5000/mwildt/dependency-track-apiserver:latest'
format: 'cyclonedx'
exit-code: '1'
ignore-unfixed: true
output: dependency-track-apiserver.sbom.json
- name: Login Registry
run: echo ${{ secrets.DOCKER_REPO_KEY }} | docker login -u github-build --password-stdin registry.ohrenpirat.de:5000
- name: Docker Push
run: docker push registry.ohrenpirat.de:5000/mwildt/dependency-track-apiserver:latest
build-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build -f frontend/frontend.dockerfile --tag registry.ohrenpirat.de:5000/mwildt/dependency-track-frontend:latest frontend
- name: Login Registry
run: echo ${{ secrets.DOCKER_REPO_KEY }} | docker login -u github-build --password-stdin registry.ohrenpirat.de:5000
- name: Docker Push
run: docker push registry.ohrenpirat.de:5000/mwildt/dependency-track-frontend:latest