Add build_flag_templates to .goreleaser.yaml

Extended the .goreleaser.yaml configuration with build_flag_templates options for the Docker image. These new flags introduce image labels for open containers, which provides more detailed image information including the creation date, project name, revision, and version.
This commit is contained in:
Winni Neessen 2024-03-13 23:59:08 +01:00
parent 48c352f998
commit f871dfb82b
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D

View file

@ -101,4 +101,11 @@ dockers:
- "wneessen/apg-go:{{ .Tag }}" - "wneessen/apg-go:{{ .Tag }}"
- "wneessen/apg-go:v{{ .Major }}" - "wneessen/apg-go:v{{ .Major }}"
- "wneessen/apg-go:v{{ .Major }}.{{ .Minor }}" - "wneessen/apg-go:v{{ .Major }}.{{ .Minor }}"
- "wneessen/apg-go:latest" - "wneessen/apg-go:latest"
build_flag_templates:
- "--pull"
- "--network=host"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"