File tree 3 files changed +19
-21
lines changed
3 files changed +19
-21
lines changed Original file line number Diff line number Diff line change 11
11
- name : Checkout
12
12
uses : actions/checkout@v2
13
13
with :
14
- fetch-depth : 1
14
+ fetch-depth : 0
15
15
16
16
- name : golangci-lint
17
17
uses : golangci/golangci-lint-action@v2
@@ -31,22 +31,20 @@ jobs:
31
31
- name : Checkout
32
32
uses : actions/checkout@v2
33
33
with :
34
- fetch-depth : 1
34
+ fetch-depth : 0
35
35
36
36
- name : Test
37
- run : make test
37
+ run : go test ./...
38
38
39
39
deploy :
40
40
name : Deploy
41
41
runs-on : ubuntu-latest
42
42
needs : [linting, test]
43
- if : startsWith(github.ref, 'refs/tags/')
44
43
45
44
env :
46
45
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47
46
48
47
steps :
49
-
50
48
- name : Install Go
51
49
uses : actions/setup-go@v2
52
50
with :
@@ -55,18 +53,22 @@ jobs:
55
53
- name : Checkout
56
54
uses : actions/checkout@v2
57
55
with :
58
- fetch-depth : 1
56
+ fetch-depth : 0
59
57
60
58
- name : Login to Docker Hub
61
59
uses : docker/login-action@v1
62
60
with :
63
- username : ${{ secrets.DOCKER_USERNAME }}
64
- password : ${{ secrets.DOCKER_TOKEN }}
61
+ registry : ghcr.io
62
+ username : ${{ github.repository_owner }}
63
+ password : ${{ secrets.GITHUB_TOKEN }}
65
64
66
- - name : Install GoReleaser
65
+ - name : Snapshot
67
66
uses : goreleaser/goreleaser-action@v2
68
67
with :
69
- install-only : true
68
+ args : release --snapshot
70
69
71
- - name : Deploy
72
- run : make deploy
70
+ - name : Release
71
+ if : startsWith(github.ref, 'refs/tags/')
72
+ uses : goreleaser/goreleaser-action@v2
73
+ with :
74
+ args : release --rm-dist
Original file line number Diff line number Diff line change @@ -4,18 +4,14 @@ builds:
4
4
- CGO_ENABLED=0
5
5
6
6
ldflags :
7
- - -X "main.version={{ .Env.VERSION }}"
7
+ - -X "main.version={{ .Version }}"
8
8
- " -s -w"
9
9
10
10
goos :
11
11
- darwin
12
12
- windows
13
13
- linux
14
14
15
- ignore :
16
- - goos : darwin
17
- goarch : 386
18
-
19
15
archives :
20
16
-
21
17
name_template : " {{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
@@ -27,5 +23,5 @@ dockers:
27
23
goarch : amd64
28
24
29
25
image_templates :
30
- - " gomicro/avenues:latest"
31
- - " gomicro/avenues:{{ .Env.VERSION }}"
26
+ - " ghcr.io/ gomicro/avenues:latest"
27
+ - " ghcr.io/ gomicro/avenues:{{ .Version }}"
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ ca_path: "path to file containing CA(.)(.)" # Optional
46
46
Avenues is intended to be used in conjunction with local Docker testing of a service.
47
47
48
48
```
49
- docker pull gomicro/avenues
50
- docker run -it -v $PWD/routes.yaml:/routes.yaml gomicro/avenues
49
+ docker pull ghcr.io/ gomicro/avenues
50
+ docker run -it -v $PWD/routes.yaml:/routes.yaml ghcr.io/ gomicro/avenues
51
51
```
52
52
53
53
# Versioning
You can’t perform that action at this time.
0 commit comments