Skip to content

Commit 08969e7

Browse files
committed
Merge workflows to fix trivy warning, remove unused workflow
1 parent 55f34c8 commit 08969e7

File tree

5 files changed

+42
-132
lines changed

5 files changed

+42
-132
lines changed

.github/workflows/check-trivy-every-night.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Publish image to GHCR on push and (scheduled) trivy"
2+
3+
# All triggers have to be in one file, so that the trivy results can be compared to identify introduced vulnerabilities
4+
# See DBP-340
5+
on:
6+
push:
7+
schedule:
8+
- cron: '0 2 * * *'
9+
10+
concurrency:
11+
group: dbildungs-iam-keycloak-${{ github.event_name }}-${{ github.ref_name }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build_image_on_push:
16+
name: "Publish image and scan with trivy"
17+
if: ${{ github.event_name == 'push' }}
18+
permissions:
19+
packages: write
20+
security-events: write
21+
contents: read
22+
uses: dBildungsplattform/dbp-github-workflows/.github/workflows/image-publish-trivy.yaml@DBP-340-trivy
23+
with:
24+
image_name: "dbildungs-iam"
25+
run_trivy_scan: true
26+
tag_generation: ${{ github.ref_name == 'main' && 'commit_hash' || 'ticket_from_branch' }}
27+
add_latest_tag: ${{ github.ref_name == 'main' }}
28+
container_registry: "ghcr.io"
29+
fail_on_vulnerabilites: true
30+
report_location: "Dockerfile"
31+
32+
scheduled_trivy_scan:
33+
name: "Scheduled trivy scan of latest image"
34+
if: ${{ github.event_name == 'schedule' }}
35+
permissions:
36+
packages: read
37+
security-events: write
38+
uses: dBildungsplattform/dbp-github-workflows/.github/workflows/check-trivy.yaml@DBP-340-trivy
39+
with:
40+
image_ref: 'ghcr.io/${{ github.repository_owner }}/dbildungs-iam:latest'
41+
fail_on_vulnerabilites: false
42+
report_location: "Dockerfile"

.github/workflows/image-publish-on-push-to-branch.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/image-publish-on-push-to-main.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/push_docker.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)