forked from microsoft/component-detection
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (33 loc) · 1.34 KB
/
test-linux.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
name: Test Linux Container Scanning
on: [pull_request]
jobs:
test-linux:
runs-on: ubuntu-latest
env:
OFFICIAL_BUILD: 'True'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: 3.1.x
- name: dotnet restore
run: dotnet restore
- name: Build and publish
run: dotnet publish -o dist --no-self-contained -c Release ./src/Microsoft.ComponentDetection
- name: Make empty directory
working-directory: src/Microsoft.ComponentDetection/
run: mkdir empty
- name: Preload node image to scan
run: docker pull node:slim
- name: Preload golang image to scan
run: docker pull golang:alpine
- name: Preload ubuntu image to scan
run: docker pull ubuntu@sha256:2b90cad5ded7946db07a28252618b9c8b7f4f103fc39266bcc795719d1362d40
- name: Preload distroless image to scan
run: docker pull gcr.io/distroless/nodejs-debian10
- name: Test linux scanner
working-directory: src/Microsoft.ComponentDetection/
run: dotnet run scan --Verbosity Verbose --SourceDirectory empty --DockerImagesToScan node:slim,golang:alpine,ubuntu@sha256:2b90cad5ded7946db07a28252618b9c8b7f4f103fc39266bcc795719d1362d40,alpine:latest,gcr.io/distroless/nodejs-debian10