Skip to content
Enable GitHub developers to deploy to Kubernetes service using GitHub Actions
JavaScript TypeScript
Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
Branch: master
Clone or download

Latest commit

ds-ms Merge pull request #9 from Azure/bufferIssue
Fixes deprecation error
Latest commit 8fb4d80 Jan 9, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Merge pull request #9 from Azure/bufferIssue Jan 9, 2020
src Merge pull request #9 from Azure/bufferIssue Jan 9, 2020
.gitignore Adding node_modules Sep 10, 2019
CODE_OF_CONDUCT.md Initial commit Sep 4, 2019
LICENSE Initial commit Sep 4, 2019
README.md Merge pull request #5 from addnab/patch-1 Dec 6, 2019
SECURITY.md Initial commit Sep 4, 2019
action.yml port from k8s-actions Sep 10, 2019
package-lock.json Adding package.json Sep 10, 2019
package.json Adding package.json Sep 10, 2019
tsconfig.json port from k8s-actions Sep 10, 2019

README.md

Log in to a container registry

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/docker-login@v1
  with:
    login-server: '<login server>' # default: index.docker.io
    username: '<username>'
    password: '<password>'

Refer to the action metadata file for details about all the inputs: action.yml

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

- uses: azure/docker-login@v1
  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.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

You can’t perform that action at this time.