How to automatically push the built image to Docker Hub Public registry

I tried to find this in the docs, but it seems there is no way to push the built image to a registry using Github actions. However, when you create a new action, one of the features claimed on the page is " Build a Docker image to deploy, run, or push to a registry. ".
Could someone tell me please if this is possible?

Hi @djnotes,

Glad to see you in Github Community Forum!

You can find related Github actions in the marketplace.

For example:

  - name: Build and push Docker images to docker hub
    uses: docker/build-push-action@v1
    with:
      username: ${{ secrets.DOCKER_USERNAME }}
      password: ${{ secrets.DOCKER_PASSWORD }}
      repository: myorg/myrepository
      tags: latest

Please refer to the usage for more details.

You can also choose other actions for the push.

Thanks

1 Like