File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test and build Go packages
2
+ on :
3
+ - push
4
+ - pull_request
5
+ jobs :
6
+ test :
7
+ runs-on : ubuntu-latest
8
+ permissions :
9
+ contents : read
10
+ steps :
11
+ - uses : actions/checkout@v3
12
+ - uses : actions/setup-go@v3
13
+ with :
14
+ go-version-file : go.mod
15
+ - uses : actions/cache@v3
16
+ with :
17
+ path : |
18
+ ~/.cache/go-build
19
+ ~/go/pkg/mod
20
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
21
+ restore-keys : |
22
+ ${{ runner.os }}-go-
23
+ - run : go test ./...
24
+
25
+ build :
26
+ runs-on : ubuntu-latest
27
+ needs :
28
+ - test
29
+ permissions :
30
+ contents : read
31
+ packages : write
32
+ steps :
33
+ - uses : actions/checkout@v3
34
+ - uses : actions/setup-go@v3
35
+ with :
36
+ go-version-file : go.mod
37
+ - uses : actions/cache@v3
38
+ with :
39
+ path : |
40
+ ~/.cache/go-build
41
+ ~/go/pkg/mod
42
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
43
+ restore-keys : |
44
+ ${{ runner.os }}-go-
45
+ - run : go build -a -o bin/pr-size ./cmd/gh-actions-pr-size
46
+ - uses : elgohr/Publish-Docker-Github-Action@v4
47
+ with :
48
+ name : ${{ github.repository }}/gh-actions-pr-size
49
+ username : ${{ github.actor }}
50
+ password : ${{ secrets.GITHUB_TOKEN }}
51
+ registry : docker.pkg.github.com
52
+ no_push : true
Original file line number Diff line number Diff line change
1
+ bin /
You can’t perform that action at this time.
0 commit comments