Compare commits

...

3 Commits

Author SHA1 Message Date
CrazyMax
a9078ed4ca Update CHANGELOG 2020-08-15 15:38:24 +02:00
CrazyMax
161192d780 Add examples for GitLab and GitHub Package Registry 2020-08-15 15:38:12 +02:00
CrazyMax
c252382ab9 Add tests again GitLab and GitHub Package Registry 2020-08-15 15:36:37 +02:00
3 changed files with 119 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ on:
- releases/v*
jobs:
main:
dockerhub:
runs-on: ubuntu-latest
strategy:
fail-fast: false
@@ -20,11 +20,63 @@ jobs:
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Login
name: Login to DockerHub
uses: ./
with:
username: ${{ secrets.DOCKER_USERNAME_TEST }}
password: ${{ secrets.DOCKER_PASSWORD_TEST }}
username: ${{ secrets.DOCKERHUB_USERNAME_TEST }}
password: ${{ secrets.DOCKERHUB_PASSWORD_TEST }}
logout: ${{ matrix.logout }}
-
name: Clear
if: always()
run: |
rm -f ${HOME}/.docker/config.json
gpr:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
logout:
- true
- false
steps:
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Login to GitHub Package Registry
uses: ./
with:
registry: docker.pkg.github.com
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: ${{ matrix.logout }}
-
name: Clear
if: always()
run: |
rm -f ${HOME}/.docker/config.json
gitlab:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
logout:
- true
- false
steps:
-
name: Checkout
uses: actions/checkout@v2.3.1
-
name: Login to GitLab
uses: ./
with:
registry: registry.gitlab.com
username: ${{ secrets.GITLAB_USERNAME_TEST }}
password: ${{ secrets.GITLAB_PASSWORD_TEST }}
logout: ${{ matrix.logout }}
-
name: Clear

View File

@@ -1,5 +1,9 @@
# Changelog
## 1.1.0 (2020/08/15)
* Add tests and examples for GitLab and GitHub Package Registry
## 1.0.1 (2020/08/15)
* Add LICENSE

View File

@@ -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