File tree Expand file tree Collapse file tree 2 files changed +68
-1
lines changed Expand file tree Collapse file tree 2 files changed +68
-1
lines changed Original file line number Diff line number Diff line change 57
57
cp dist/linux_amd64/default_linux_amd64_v1/observe-agent .
58
58
59
59
- name : Build an image from Dockerfile
60
- run : docker build -f packaging/docker/Dockerfile -t docker.io/${{ env.TEST_TAG}} .
60
+ run : docker build -f packaging/docker/Dockerfile -t docker.io/${{ env.TEST_TAG }} .
61
61
62
62
- name : Docker Scout
63
63
id : docker-scout
Original file line number Diff line number Diff line change
1
+ name : Pre-release Docker Image Vulnerability Check
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ branch :
7
+ required : true
8
+ type : string
9
+
10
+ permissions :
11
+ contents : read
12
+
13
+ env :
14
+ TEST_TAG : observeinc/observe-agent:test
15
+
16
+ jobs :
17
+ vuln-check :
18
+ runs-on : ubuntu-observe-agent-8cpu
19
+ steps :
20
+ - name : Checkout
21
+ uses : actions/checkout@v4
22
+ with :
23
+ fetch-depth : 0
24
+ ref : ${{ github.event.inputs.branch }}
25
+
26
+ - name : Login to Docker Hub
27
+ uses : docker/login-action@v3
28
+ with :
29
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
30
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
31
+
32
+ - name : Set up Docker Buildx
33
+ uses : docker/setup-buildx-action@v3
34
+
35
+ - name : Set up Go
36
+ uses : actions/setup-go@v5
37
+ with :
38
+ go-version : 1.23.7
39
+
40
+ - name : Run GoReleaser
41
+ uses : goreleaser/goreleaser-action@v6
42
+ with :
43
+ distribution : goreleaser-pro
44
+ version : 2.7.0
45
+ args : build --snapshot --id=default --skip=validate --single-target
46
+ env :
47
+ GORELEASER_KEY : ${{ secrets.GORELEASER_KEY }}
48
+
49
+ - name : Copy Binary
50
+ run : |
51
+ cp dist/linux_amd64/default_linux_amd64_v1/observe-agent .
52
+
53
+ - name : Build an image from Dockerfile
54
+ run : docker build -f packaging/docker/Dockerfile -t docker.io/${{ env.TEST_TAG }} .
55
+
56
+ - name : Docker Scout
57
+ id : docker-scout
58
+ uses : docker/scout-action@v1
59
+ with :
60
+ image : ${{ env.TEST_TAG }}
61
+ command : cves,recommendations
62
+ to-latest : true
63
+ ignore-base : true
64
+ ignore-unchanged : true
65
+ only-fixed : false
66
+ only-severities : critical,high
67
+ exit-code : true
You can’t perform that action at this time.
0 commit comments