Skip to content

Commit

Permalink
Add examples for GitLab and GitHub Package Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyMax committed Aug 15, 2020
1 parent c252382 commit 161192d
Showing 1 changed file with 59 additions and 2 deletions.
61 changes: 59 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -23,6 +26,33 @@ ___

## Usage

### DockerHub

```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:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
```
### GitHub Package Registry
```yaml
name: ci

Expand All @@ -42,8 +72,35 @@ jobs:
name: Login to DockerHub
uses: crazy-max/ghaction-docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
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
Expand Down

0 comments on commit 161192d

Please sign in to comment.