-
Notifications
You must be signed in to change notification settings - Fork 176
53 lines (49 loc) · 1.5 KB
/
release-snapshot.yaml
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
---
# Release snapshot on CRON schedule (every night) or on demand.
name: Release snapshot
on:
workflow_dispatch: {}
schedule:
- cron: "0 0 * * *"
env:
GO_VERSION: "1.17"
# Disable permissions granted to the GITHUB_TOKEN for all the available scopes.
permissions: {}
jobs:
release-snapshot:
name: Release unversioned snapshot
runs-on: ubuntu-20.04
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Release snapshot
uses: goreleaser/goreleaser-action@v2
with:
version: v1.7.0
args: release --snapshot --skip-publish --rm-dist
- name: Scan Trivy Operator image for vulnerabilities
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/aquasec/trivy-operator:${{ github.sha }}-amd64'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'