-
-
Notifications
You must be signed in to change notification settings - Fork 4
128 lines (107 loc) · 2.89 KB
/
verify.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
name: Verify
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
packages: read
id-token: write
env:
GO111MODULE: "on"
jobs:
conform:
runs-on: ubuntu-latest
name: Conform
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: siderolabs/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
lint_provider:
runs-on: ubuntu-latest
name: Lint Provider
strategy:
max-parallel: 4
matrix:
go-version: [1.21.x]
golangci-lint-version: [v1.54.2]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "${{ matrix.go-version }}"
- name: Lint Provider
uses: golangci/golangci-lint-action@v3
with:
version: "${{ matrix.golangci-lint-version }}"
args: -c .golangci.yml
skip-pkg-cache: true
skip-build-cache: true
- name: Vet Provider
run: |
go vet ./...
- run: |
go install github.com/mattn/goveralls@latest
goveralls -coverprofile=covprofile -service=github
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dockerfile_lint:
runs-on: ubuntu-latest
name: Lint Dockerfile
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
fetch-depth: 0
- name: Lint Dockerfile
uses: hadolint/[email protected]
with:
dockerfile: Dockerfile
build:
runs-on: ubuntu-latest
name: Build Provider and Container
needs:
- lint_provider
- dockerfile_lint
strategy:
max-parallel: 4
matrix:
go-version: [1.21.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "${{ matrix.go-version }}"
- name: Install cosign
uses: sigstore/[email protected]
- name: Download Syft
uses: anchore/sbom-action/[email protected]
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Release via GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
args: -p 3 release --snapshot --clean --skip=publish --timeout 60m0s
version: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_COMMIT_TIMESTAMP: ${{ github.event.pull_request.updated_at }}
CI_COMMIT_SHA: ${{ github.sha }}
CI_COMMIT_TAG: ${{ github.sha }}-dev