File tree Expand file tree Collapse file tree 1 file changed +26
-17
lines changed Expand file tree Collapse file tree 1 file changed +26
-17
lines changed Original file line number Diff line number Diff line change 1
1
name : build
2
2
3
3
on :
4
- pull_request :
5
- branches : master
6
4
push :
7
- branches : master
8
- tags : v*
5
+ branches : ' master'
6
+ tags : ' v*'
7
+ paths :
8
+ - ' .github/workflows/build.yml'
9
+ - ' cmd/**'
10
+ - ' internal/**'
11
+ - ' .goreleaser.yml'
12
+ - ' Dockerfile'
13
+ - ' go.mod'
14
+ - ' go.sum'
9
15
10
16
jobs :
11
17
go :
12
18
runs-on : ubuntu-latest
13
19
steps :
20
+ -
21
+ # https://github.com/actions/checkout
22
+ name : Checkout
23
+ uses : actions/checkout@v1
14
24
-
15
25
name : Prepare
16
26
id : prepare
@@ -25,15 +35,14 @@ jobs:
25
35
with :
26
36
go-version : 1.12.10
27
37
-
28
- name : Set GOPATH
29
- # temporary fix (see https://github.com/actions/setup-go/issues/14)
30
- run : |
31
- echo "##[set-env name=GOPATH;]$(dirname $GITHUB_WORKSPACE)"
32
- echo "##[add-path]$(dirname $GITHUB_WORKSPACE)/bin"
33
- -
34
- # https://github.com/actions/checkout
35
- name : Checkout
36
- uses : actions/checkout@v1
38
+ # https://github.com/actions/cache
39
+ name : Cache Go modules
40
+ uses : actions/cache@v1
41
+ with :
42
+ path : ~/go/pkg/mod
43
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
44
+ restore-keys : |
45
+ ${{ runner.os }}-go-
37
46
-
38
47
# https://github.com/goreleaser/goreleaser-action
39
48
name : GoReleaser
59
68
runs-on : ubuntu-latest
60
69
needs : go
61
70
steps :
71
+ -
72
+ # https://github.com/actions/checkout
73
+ name : Checkout
74
+ uses : actions/checkout@v1
62
75
-
63
76
name : Prepare
64
77
id : prepare
78
91
uses : crazy-max/ghaction-docker-buildx@v1
79
92
with :
80
93
version : latest
81
- -
82
- # https://github.com/actions/checkout
83
- name : Checkout
84
- uses : actions/checkout@v1
85
94
-
86
95
name : Docker Buildx (no push)
87
96
run : |
You can’t perform that action at this time.
0 commit comments