Docker image push on every tag push

📚 Learn more about Docker push action features, integrations and alternatives.

Buddy is a CI/CD tool that helps developers automate delivery. For example, you can use Buddy to run unit tests whenever a new tag is pushed to the selected branch, dockerize the application, and then push the image to multiple Docker registries: Pipeline examplePipeline example

Pipeline

First, select the Git provider (GitHub, Bitbucket, GitLab, or private) and the repository from which Buddy will fetch the code: Selecting a repositorySelecting a repository

The next step is adding a pipeline and setting it to run whenever a new tag is pushed to the repository. To do that, set the trigger mode to On push, select Tags by wildcard as the branch, and customize the refs/tags pattern that will trigger the pipeline. For example, setting the pattern to refs/tags/v* will only deploy the tags starting with v, such as v1, v1.1, v2, and so on. Adding a new pipelineAdding a new pipeline

Now, add the action that will build an image from your Dockerfile: Docker actionsDocker actions

Now it's time to add the 'Push Docker image' action that will release your application to the selected registry. As you can have several building actions in your pipeline, make sure to select the one that built the image that you want to push: Docker action configurationDocker action configuration

The next step is selecting the registry to which the image will be pushed. Buddy has a dedicated integration with Docker Hub, Amazon ECR and Google GCR, but you can use a private registry as well: Selecting Docker registrySelecting Docker registry

Finally, determine the URL to the image in the registry and the tag with which it will be pushed.

You can use the $BUDDY_EXECUTION_TAG variable to automatically tag the images with the tags created in your repository. This is one of many environment variables you can use. Using the tagsUsing the tags

See also

Last modified on May 23, 2022

Questions?

Not sure how to configure a pipeline for your process? Reach out on the live-chat or contact support

Get Started

Sign up for free and deploy your project in less than 10 minutes.