mirror of
https://github.com/docker/login-action.git
synced 2025-08-18 01:59:53 +08:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a9078ed4ca | ||
|
161192d780 | ||
|
c252382ab9 | ||
|
7e07bf5fa3 |
60
.github/workflows/ci.yml
vendored
60
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
@@ -1,5 +1,13 @@
|
||||
# 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
|
||||
|
||||
## 1.0.0 (2020/08/15)
|
||||
|
||||
* Initial version
|
||||
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 CrazyMax
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
76
README.md
76
README.md
@@ -15,12 +15,19 @@ 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)
|
||||
* [How can I help?](#how-can-i-help)
|
||||
* [License](#license)
|
||||
|
||||
## Usage
|
||||
|
||||
### DockerHub
|
||||
|
||||
```yaml
|
||||
name: ci
|
||||
|
||||
@@ -40,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
|
||||
@@ -60,3 +119,16 @@ Following inputs can be used as `step.with` keys
|
||||
## Limitation
|
||||
|
||||
This action is only available for Linux [virtual environments](https://help.github.com/en/articles/virtual-environments-for-github-actions#supported-virtual-environments-and-hardware-resources).
|
||||
|
||||
## How can I help?
|
||||
|
||||
All kinds of contributions are welcome :raised_hands:! The most basic way to show your support is to star :star2:
|
||||
the project, or to raise issues :speech_balloon: You can also support this project by
|
||||
[**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) :clap: or by making a
|
||||
[Paypal donation](https://www.paypal.me/crazyws) to ensure this journey continues indefinitely! :rocket:
|
||||
|
||||
Thanks again for your support, it is much appreciated! :pray:
|
||||
|
||||
## License
|
||||
|
||||
MIT. See `LICENSE` for more details.
|
||||
|
@@ -18,7 +18,7 @@
|
||||
"login"
|
||||
],
|
||||
"author": "CrazyMax",
|
||||
"license": "Apache-2.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.4",
|
||||
"@actions/exec": "^1.0.4"
|
||||
|
Reference in New Issue
Block a user