Skip to content

Commit 3514c30

Browse files
committed
Add Docker image in release (#489)
1 parent 935acca commit 3514c30

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ golinter
22
revive
33
vendor
44
*.swp
5+
dist/

.goreleaser.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ builds:
2222
- darwin
2323
- windows
2424

25+
dockers:
26+
- image_templates: ["ghcr.io/mgechev/revive:{{ .Version }}"]
27+
dockerfile: Dockerfile
28+
build_flag_templates:
29+
- --label=org.opencontainers.image.title={{ .ProjectName }}
30+
- --label=org.opencontainers.image.description={{ .ProjectName }}
31+
- --label=org.opencontainers.image.url=https://github.com/mgechev/revive
32+
- --label=org.opencontainers.image.source=https://github.com/mgechev/revive
33+
- --label=org.opencontainers.image.version={{ .Version }}
34+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
35+
- --label=org.opencontainers.image.licenses=MIT
36+
2537
changelog:
2638
filters:
2739
exclude:

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM scratch
2+
COPY revive /usr/bin/revive
3+
ENTRYPOINT ["/usr/bin/revive"]

0 commit comments

Comments
 (0)