Skip to content

Commit

Permalink
Add docker hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ashanbrown committed Nov 30, 2020
1 parent 03dc25c commit 8efd413
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
project_name: gofmts

before:
hooks:
- go mod download
Expand Down Expand Up @@ -45,3 +47,7 @@ dockers:
- "ghcr.io/ashanbrown/{{.ProjectName}}:v{{ .Major }}"
- "ghcr.io/ashanbrown/{{.ProjectName}}:v{{ .Major }}.{{ .Minor }}"
- "ghcr.io/ashanbrown/{{.ProjectName}}:latest"
- "ashanbrown/{{.ProjectName}}:{{ .Tag }}"
- "ashanbrown/{{.ProjectName}}:v{{ .Major }}"
- "ashanbrown/{{.ProjectName}}:v{{ .Major }}.{{ .Minor }}"
- "ashanbrown/{{.ProjectName}}:latest"
10 changes: 5 additions & 5 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
entry: gofmts -l -w
types: [go]

#- id: gofmts-docker
# name: gofmts
# language: docker_image
# entry: "ghcr.io/ashanbrown/gofmts:latest"
# types: [go]
- id: gofmts-docker
name: gofmts
language: docker_image
entry: "ghcr.io/ashanbrown/gofmts:latest"
types: [go]
2 changes: 1 addition & 1 deletion Dockerfile.goreleaser
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM scratch
COPY gofmts /bin
COPY gofmts /bin/gofmts
ENTRYPOINT ["/bin/gofmts"]

0 comments on commit 8efd413

Please sign in to comment.