File tree 2 files changed +22
-8
lines changed
2 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 1
1
name : " CI"
2
- on : [push, pull_request]
2
+ on :
3
+ push :
4
+ branches :
5
+ - " master"
6
+ pull_request :
3
7
4
8
jobs :
5
9
basic-checks :
6
10
runs-on : ubuntu-latest
7
11
steps :
8
12
- uses : actions/checkout@v3
13
+
9
14
- uses : actions/setup-go@v3
10
15
with :
11
16
go-version : " 1.17"
12
17
18
+ - name : Cache Go modules
19
+ uses : actions/cache@v1
20
+ with :
21
+ path : ~/go/pkg/mod
22
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
23
+ restore-keys : |
24
+ ${{ runner.os }}-go-
25
+
13
26
- name : " Formatting check"
14
27
run : make fmt
15
28
Original file line number Diff line number Diff line change 1
1
name : " Release"
2
2
on :
3
- push :
4
- tags :
5
- - " v*"
3
+ release :
4
+ types : [published]
6
5
7
6
jobs :
8
7
docker :
9
8
runs-on : ubuntu-latest
9
+ if : github.event.release.target_commitish == 'master'
10
10
steps :
11
11
- uses : actions/checkout@v3
12
+
12
13
- uses : actions/setup-go@v3
13
14
with :
14
- go-version : " 1.17"
15
+ go-version : " 1.17.7 "
15
16
16
17
- name : Set tag in environment
17
18
run : echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV # extracts the tag name from refs/tags/v1.2.3
21
22
22
23
- name : " Docker login to Quay.io"
23
24
env :
24
- DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
25
- DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
26
- run : docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD quay.io
25
+ QUAY_PASSWORD : ${{ secrets.QUAY_PASSWORD }}
26
+ QUAY_USERNAME : ${{ secrets.QUAY_USERNAME }}
27
+ run : docker login -u $QUAY_USERNAME -p $QUAY_PASSWORD quay.io
27
28
28
29
- name : " Push image"
29
30
run : make docker-push TAG=$RELEASE_VERSION
You can’t perform that action at this time.
0 commit comments