Skip to content
Container related Github actions
JavaScript TypeScript
Branch: master
Clone or download
Latest commit 7ca7a7a Aug 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker-login Update action.yml Aug 13, 2019
docker-logout Update README.md Aug 8, 2019
node_modules Adding node_modules Aug 8, 2019
.gitignore Adding node_modules Aug 8, 2019
CODE_OF_CONDUCT.md Initial commit Aug 8, 2019
LICENSE Initial commit Aug 8, 2019
README.md Update README.md Aug 14, 2019
package-lock.json Adding docker-login and docker-logou actions Aug 8, 2019
package.json Adding docker-login and docker-logou actions Aug 8, 2019

README.md

GitHub Actions for Containers

GitHub Actions gives you the flexibility to build an automated software development lifecycle workflow.

This repository contains GitHub Actions 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.

GitHub Actions for Kubernetes contains actions for deploying to a Kubernetes cluster for example Azure Kubernetes service (AKS). Similarly, there are actions for deploying to Azure Web App for Containers.

GitHub Action for Azure repository has a list of all the GitHub Actions for Azure.

Usage

Detailed usage information for individual commands can be found in their respective directories.

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.

Example - Log in to a container registry

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

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.