Commit 320e0f2 1 parent 566a108 commit 320e0f2 Copy full SHA for 320e0f2
File tree 2 files changed +37
-4
lines changed
2 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 1
- name : Create and publish a container image
1
+ name : Create and publish artifacts
2
2
3
3
on :
4
4
push :
@@ -15,7 +15,36 @@ concurrency:
15
15
cancel-in-progress : true
16
16
17
17
jobs :
18
+ lint :
19
+ name : Lint
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - uses : actions/checkout@v4
23
+ - uses : actions/setup-go@v5
24
+
25
+ - name : Go Format
26
+ run : gofmt -s -w . && git diff --exit-code
27
+
28
+ - name : Go Vet
29
+ run : go vet
30
+
31
+ - name : Go Tidy
32
+ run : go mod tidy && git diff --exit-code
33
+
34
+ - name : Go Mod
35
+ run : go mod download
36
+
37
+ - name : Go Mod Verify
38
+ run : go mod verify
39
+
40
+ - name : Install govulncheck
41
+ run : go install golang.org/x/vuln/cmd/govulncheck@latest
42
+
43
+ - name : Run govulncheck
44
+ run : govulncheck
45
+
18
46
build-and-push-image :
47
+ needs : lint
19
48
runs-on : ubuntu-latest
20
49
timeout-minutes : 10
21
50
permissions :
51
80
annotations : ${{ steps.meta.outputs.annotations }}
52
81
53
82
releases-matrix :
83
+ needs : lint
54
84
permissions :
55
85
contents : write
56
86
name : Release Go Binaries
63
93
- uses : actions/checkout@v4
64
94
- uses : actions/setup-go@v5
65
95
- name : Build
66
- run : |
67
- GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} CGO_ENABLED=0 go build -ldflags="-s -w" -trimpath -o pvpc_exporter main.go
96
+ run : go build -ldflags="-s -w" -trimpath -o pvpc_exporter main.go
97
+ env :
98
+ CGO_ENABLED : 0
99
+ GOOS : ${{ matrix.goos }}
100
+ GOARCH : ${{ matrix.goarch }}
68
101
- name : Compress
69
102
run : zip pvpc_exporter-${{ matrix.goos }}-${{ matrix.goarch }}.zip pvpc_exporter
70
103
- name : Create Release
Original file line number Diff line number Diff line change 1
1
module pvpc_exporter
2
2
3
- go 1.22.7
3
+ go 1.23
You can’t perform that action at this time.
0 commit comments