salmon-scientist-57815
12/04/2024, 2:10 PMmicroscopic-river-74022
12/04/2024, 2:10 PMmicroscopic-river-74022
12/04/2024, 2:11 PMgarden publish
command with the --tag
option. Here's how you can do it:
1. For tagging with the git branch:
garden publish --tag 'v0.1-${git.branch}'
2. For tagging with "latest":
garden publish --tag "latest"
These commands will build the Docker image and apply the specified tag. The ${git.branch}
is a template string that Garden will replace with the current git branch name.
It's important to note that you should wrap templated tags with single quotes to prevent your shell from attempting to perform its own substitution.
You can also use other template strings available for action configs. For example:
- ${build.version}
for the full Garden version of the build
- ${build.hash}
for the Garden version hash of the build
Publishing images () provides more details on how to use these template strings and other options for publishing images with Garden.
Remember that before publishing, you need to specify the publishId
field in your container action's spec
to indicate where the image should be published, unless you're publishing to your configured deployment registry when using the kubernetes
provider.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
12/04/2024, 2:11 PM