-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (50 loc) · 1.32 KB
/
release.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
54
55
56
57
58
59
60
61
62
name: build
on:
release:
types: [published]
jobs:
test:
name: test
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v1
with:
go-version-file: go.mod
- name: Lint
run: ./build/hack/lint-check.sh
- name: Test
run: go test ./...
- name: Coverage
run: ./build/hack/coverage.sh
build:
name: build
runs-on: ubuntu-18.04
needs: [test]
if: github.event_name == 'push'
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
# Docker build steps stuff
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
deploy:
name: deploy
runs-on: ubuntu-18.04
needs: [build]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2