k8s-actions/docker-login
UshaN 7a93ceb73d Update action.yml with deprecation message (#34)
* Update action.yml

* Update action.yml

* Update action.yml

* Update action.yml

* Update action.yml

* Update action.yml

* Update action.yml
2019-12-04 16:24:40 +05:30
..
lib Adding deprecation warning (#21) 2019-08-14 12:47:50 +05:30
src Adding deprecation warning (#21) 2019-08-14 12:47:50 +05:30
README.md Moved Docker actions 2019-08-12 18:29:41 +05:30
action.yml Update action.yml with deprecation message (#34) 2019-12-04 16:24:40 +05:30
tsconfig.json Revert "Moved container actions to aazure/container-actions" 2019-08-08 20:55:00 +05:30

README.md

Log in to a container registry

The docker-login Actions in this repository will be deleted in the near future. Please use the Docker Actions from container-actions.

Use this GitHub Action to log in to a private container registry such as Azure Container registry. Once login is done, the next set of actions in the workflow can perform tasks such as building, tagging and pushing containers.

- uses: azure/container-actions/docker-login@master
  with:
    username: '<username>'
    password: '<password>'
    loginServer: '<login server>' # default: index.docker.io
    email: '<email id>'

Refer to the action metadata file for details about all the inputs https://github.com/Azure/k8s-actions/blob/master/docker-login/action.yml

You can build and push container registry by using the following example

- uses: azure/container-actions/docker-login@master
      with:
        login-server: contoso.azurecr.io
        username: ${{ secrets.REGISTRY_USERNAME }}
        password: ${{ secrets.REGISTRY_PASSWORD }}
    
    - run: |
        docker build . -t contoso.azurecr.io/k8sdemo:${{ github.sha }}
        docker push contoso.azurecr.io/k8sdemo:${{ github.sha }}        

Prerequisite

Get the username and password of your container registry and create secrets for them. For Azure Container registry refer to admin account document for username and password.

Now add the username and password as a secret in the GitHub repository.