Skip to content

Commit 95c12fd

Browse files
authored
Merge pull request #45 from gomicro/move-repo
Update and move repo
2 parents cf90b92 + 0965eaf commit 95c12fd

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

.github/workflows/build.yml

+14-12
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Checkout
1212
uses: actions/checkout@v2
1313
with:
14-
fetch-depth: 1
14+
fetch-depth: 0
1515

1616
- name: golangci-lint
1717
uses: golangci/golangci-lint-action@v2
@@ -31,22 +31,20 @@ jobs:
3131
- name: Checkout
3232
uses: actions/checkout@v2
3333
with:
34-
fetch-depth: 1
34+
fetch-depth: 0
3535

3636
- name: Test
37-
run: make test
37+
run: go test ./...
3838

3939
deploy:
4040
name: Deploy
4141
runs-on: ubuntu-latest
4242
needs: [linting, test]
43-
if: startsWith(github.ref, 'refs/tags/')
4443

4544
env:
4645
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4746

4847
steps:
49-
5048
- name: Install Go
5149
uses: actions/setup-go@v2
5250
with:
@@ -55,18 +53,22 @@ jobs:
5553
- name: Checkout
5654
uses: actions/checkout@v2
5755
with:
58-
fetch-depth: 1
56+
fetch-depth: 0
5957

6058
- name: Login to Docker Hub
6159
uses: docker/login-action@v1
6260
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 }}
6564

66-
- name: Install GoReleaser
65+
- name: Snapshot
6766
uses: goreleaser/goreleaser-action@v2
6867
with:
69-
install-only: true
68+
args: release --snapshot
7069

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

.goreleaser.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ builds:
44
- CGO_ENABLED=0
55

66
ldflags:
7-
- -X "main.version={{ .Env.VERSION }}"
7+
- -X "main.version={{ .Version }}"
88
- "-s -w"
99

1010
goos:
1111
- darwin
1212
- windows
1313
- linux
1414

15-
ignore:
16-
- goos: darwin
17-
goarch: 386
18-
1915
archives:
2016
-
2117
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
@@ -27,5 +23,5 @@ dockers:
2723
goarch: amd64
2824

2925
image_templates:
30-
- "gomicro/avenues:latest"
31-
- "gomicro/avenues:{{ .Env.VERSION }}"
26+
- "ghcr.io/gomicro/avenues:latest"
27+
- "ghcr.io/gomicro/avenues:{{ .Version }}"

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ ca_path: "path to file containing CA(.)(.)" # Optional
4646
Avenues is intended to be used in conjunction with local Docker testing of a service.
4747

4848
```
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
5151
```
5252

5353
# Versioning

0 commit comments

Comments
 (0)