Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (18 sloc) 1.17 KB

GitHub Action for Docker Login

The GitHub Action for Docker Login wraps the Docker CLI's docker login, allowing for Actions to log into Docker.

Because $HOME is persisted across Actions, the docker login command will save this information into $HOME/.docker/config.json, allowing other Actions to push, pull or otherwise modify images.


There are two required Secrets to be set:

  • DOCKER_USERNAME - this is the username used to log in to your Docker registry.
  • DOCKER_PASSWORD - this is the password used to log in to your Docker registry.

An example of logging into Docker Hub would look like this:

action "Docker Login" {
  uses = "actions/docker/login@master"

In addition, if you're logging into a registry that's not Docker Hub, you can add a secret at DOCKER_REGISTRY_URL to point to a different registry.


The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

Container images built with this project include third party materials. See for details.

You can’t perform that action at this time.