From 161192d7804ab7ea55f1d9a926be800938acdeea Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 15 Aug 2020 15:38:12 +0200 Subject: [PATCH] Add examples for GitLab and GitHub Package Registry --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 55aa0d7..934e436 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,9 @@ If you are interested, [check out](https://git.io/Je09Y) my other :octocat: GitH ___ * [Usage](#usage) + * [DockerHub](#dockerhub) + * [GitHub Package Registry](#github-package-registry) + * [GitLab](#gitlab) * [Customizing](#customizing) * [inputs](#inputs) * [Limitation](#limitation) @@ -23,6 +26,8 @@ ___ ## Usage +### DockerHub + ```yaml name: ci @@ -42,8 +47,60 @@ jobs: name: Login to DockerHub uses: crazy-max/ghaction-docker-login@v1 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} +``` + +### GitHub Package Registry + +```yaml +name: ci + +on: + push: + branches: master + tags: + +jobs: + login: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Login to DockerHub + uses: crazy-max/ghaction-docker-login@v1 + with: + registry: docker.pkg.github.com + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} +``` + +### GitLab + +```yaml +name: ci + +on: + push: + branches: master + tags: + +jobs: + login: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Login to GitLab + uses: crazy-max/ghaction-docker-login@v1 + with: + registry: registry.gitlab.com + username: ${{ secrets.GITLAB_USERNAME }} + password: ${{ secrets.GITLAB_PASSWORD }} ``` ## Customizing