automatic trivy scan

This commit is contained in:
bunkerity 2020-11-21 15:54:52 +01:00
parent eaf817d57a
commit 2032596880
No known key found for this signature in database
GPG Key ID: 654FFF51CEF7CC47
2 changed files with 28 additions and 19 deletions

View File

@ -1,19 +0,0 @@
name: Automatic test
on:
push:
branches: [dev, master]
pull_request:
branches: [dev, master]
jobs:
test:
runs_on: ubuntu-latest
steps:
- name: Checkout source code
- uses: actions/checkout@v2
- name: Build the image
run: docker build -t autotest .
- name: Run autotest
run: docker run autotest test

28
.github/workflows/autotest.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Automatic test
on:
push:
branches: [dev, master]
pull_request:
branches: [dev, master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Build the image
run: docker build -t autotest .
- name: Run autotest
run: docker run autotest test
- name: Run Trivy security scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'autotest'
format: 'table'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'