Skip to content

Commit

Permalink
Add tags to docker images built by GoReleaser (#794)
Browse files Browse the repository at this point in the history
fixes Missing tag "latest" on container images uploaded to ghcr.io #786
  • Loading branch information
echoix committed Feb 23, 2023
1 parent 10d4f5f commit cab1184
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,22 @@ builds:
- windows

dockers:
- image_templates: ["ghcr.io/mgechev/revive:{{ .Version }}"]
dockerfile: Dockerfile
build_flag_templates:
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://github.com/mgechev/revive
- --label=org.opencontainers.image.source=https://github.com/mgechev/revive
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT

- image_templates:
- "ghcr.io/mgechev/revive:{{ .Version }}"
- "ghcr.io/mgechev/revive:{{ .Tag }}"
- "ghcr.io/mgechev/revive:v{{ .Major }}.{{ .Minor }}"
- "ghcr.io/mgechev/revive:v{{ .Major }}"
- "ghcr.io/mgechev/revive:latest"
dockerfile: Dockerfile
build_flag_templates:
- --label=org.opencontainers.image.created={{.Date}}
- --label=org.opencontainers.image.title={{ .ProjectName }}
- "--label=org.opencontainers.image.description=馃敟 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint"
- --label=org.opencontainers.image.url=https://github.com/mgechev/revive
- --label=org.opencontainers.image.source=https://github.com/mgechev/revive
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.licenses=MIT
changelog:
filters:
exclude:
Expand Down

0 comments on commit cab1184

Please sign in to comment.