-
Notifications
You must be signed in to change notification settings - Fork 6
46 lines (44 loc) · 1.37 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
name: Tests
on: [push]
jobs:
test_job:
runs-on: ubuntu-latest
name: A job to run a container security scan
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Running tests
run: |
echo "Installing app dependencies"
pip install -r requirements.txt
echo "Installing test dependencies"
pip install -r requirements-test.txt
echo "Setting python path"
export PYTHONPATH=.
echo "Running tests"
pytest tests/
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: actions/consec:latest
load: true
- name: Runs the container security scan
uses: ./
id: consec
with:
repo_name: actions/consec
tag_name: latest
wait_for_results: true
env:
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
- name: Gets the risk score
run: echo "The risk score ${{ steps.consec.outputs.risk_score }}"
- name: Gets the risk scores for cves
run: echo "The cve information is ${{ steps.consec.outputs.cve_info }}"