1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-19 20:57:53 +02:00
Carlos Alexandro Becker 6b645926a8
docs: improve docs (#5006)
closes https://github.com/orgs/goreleaser/discussions/5004

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-07-17 10:56:36 -03:00

70 lines
1.8 KiB
Markdown

# DockerHub
<!-- md:pro -->
DockerHub allows you to set an image description and a full description.
However, this is not possible via `docker push`.
This pipe allows you to configure these fields and ensures they are set when
publishing your releases.
You also have plenty of customization options:
```yaml
# goreleaser.yaml
dockerhub:
- # Your hub.docker.com username. Must have 'editor' permissions
#
# Default: "{{ .Env.DOCKER_USERNAME }}".
# Templates: allowed.
username: "john.doe"
# Environment variable name to get the push token from.
# You might want to change it if you have multiple dockerhub configurations.
#
# Templates: allowed.
# Default: "DOCKER_PASSWORD".
secret_name: DOCKER_TOKEN
# Images to apply the description and/or full description to.
#
# Templates: allowed.
images:
- goreleaser/goreleaser
- goreleaser/goreleaser-pro
# Disables the configuration feature in some conditions, for instance, when
# publishing patch releases.
# Any value different of 'true' will be considered 'false'.
#
# Templates: allowed.
disable: "{{gt .Patch 0}}"
# The short description of the image.
#
# Templates: allowed.
description: A short description
# The full description of the image.
#
# It can be a string directly, or you can use `from_url` or `from_file` to
# source it from somewhere else.
#
# Templates: allowed.
full_description:
# Loads from an URL.
from_url:
# Templates: allowed.
url: https://foo.bar/README.md
headers:
x-api-token: "${MYCOMPANY_TOKEN}"
# Loads from a local file.
# Overrides `from_url`.
from_file:
# Templates: allowed.
path: ./README.md
```
<!-- md:templates -->