-
-
Notifications
You must be signed in to change notification settings - Fork 15
51 lines (44 loc) · 1.12 KB
/
ci.yaml
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
50
51
---
on:
pull_request: {}
push:
branches:
- main
name: CI
jobs:
build_docker_image:
name: 'Built test Docker image'
runs-on: ubuntu-latest
defaults:
run:
working-directory: 'puppetserver'
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: puppetserver
tags: 'ci/puppetserver:${{ github.sha }}'
push: false
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'ci/puppetserver:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
tests:
needs:
- build_docker_image
runs-on: ubuntu-latest
name: Test suite
steps:
- run: echo Test suite completed