mirror of
https://github.com/docker/login-action.git
synced 2025-11-11 20:46:20 +08:00
Compare commits
22 Commits
v3.3.0
...
b3531bd81d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3531bd81d | ||
|
|
13f19da876 | ||
|
|
d5aa2ceaed | ||
|
|
0f01ac32a8 | ||
|
|
7ca345011a | ||
|
|
02b671aa02 | ||
|
|
06895751d1 | ||
|
|
02c9ff3be2 | ||
|
|
5d8785b43a | ||
|
|
7a65d3de5d | ||
|
|
bd2f40996a | ||
|
|
9fd0581bf0 | ||
|
|
eefb7e8744 | ||
|
|
cb13d66af0 | ||
|
|
1f36f5b7a2 | ||
|
|
bcb47c2c49 | ||
|
|
8165a5b270 | ||
|
|
29df2a9f8c | ||
|
|
2b0e0e02ba | ||
|
|
fe7fd06c5d | ||
|
|
3b8fed7e4b | ||
|
|
90de1764cc |
21
.github/workflows/publish.yml
vendored
Normal file
21
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: publish
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
packages: write
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Publish
|
||||
uses: actions/publish-immutable-action@v0.0.4
|
||||
61
README.md
61
README.md
@@ -24,6 +24,7 @@ ___
|
||||
* [OCI Oracle Cloud Infrastructure Registry (OCIR)](#oci-oracle-cloud-infrastructure-registry-ocir)
|
||||
* [Quay.io](#quayio)
|
||||
* [DigitalOcean](#digitalocean-container-registry)
|
||||
* [Buildkite Packages](#buildkite-package-registry)
|
||||
* [Customizing](#customizing)
|
||||
* [inputs](#inputs)
|
||||
* [Contributing](#contributing)
|
||||
@@ -51,7 +52,7 @@ jobs:
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
```
|
||||
|
||||
@@ -105,7 +106,7 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: registry.gitlab.com
|
||||
username: ${{ secrets.GITLAB_USERNAME }}
|
||||
username: ${{ vars.GITLAB_USERNAME }}
|
||||
password: ${{ secrets.GITLAB_PASSWORD }}
|
||||
```
|
||||
|
||||
@@ -136,7 +137,7 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: <registry-name>.azurecr.io
|
||||
username: ${{ secrets.AZURE_CLIENT_ID }}
|
||||
username: ${{ vars.AZURE_CLIENT_ID }}
|
||||
password: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||
```
|
||||
|
||||
@@ -199,8 +200,7 @@ jobs:
|
||||
Use a service account with permission to push to GCR and [configure access control](https://cloud.google.com/container-registry/docs/access-control).
|
||||
Download the key for the service account as a JSON file. Save the contents of
|
||||
the file [as a secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-a-repository)
|
||||
named `GCR_JSON_KEY` in your GitHub repository. Set the username to `_json_key`,
|
||||
or `_json_key_base64` if you use a base64-encoded key.
|
||||
named `GCR_JSON_KEY` in your GitHub repository. Set the username to `_json_key`.
|
||||
|
||||
```yaml
|
||||
name: ci
|
||||
@@ -322,7 +322,7 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: <aws-account-number>.dkr.ecr.<region>.amazonaws.com
|
||||
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
username: ${{ vars.AWS_ACCESS_KEY_ID }}
|
||||
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
```
|
||||
|
||||
@@ -345,7 +345,7 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: <aws-account-number>.dkr.ecr.<region>.amazonaws.com
|
||||
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
username: ${{ vars.AWS_ACCESS_KEY_ID }}
|
||||
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
env:
|
||||
AWS_ACCOUNT_IDS: 012345678910,023456789012
|
||||
@@ -371,7 +371,7 @@ jobs:
|
||||
name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-access-key-id: ${{ vars.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: <region>
|
||||
-
|
||||
@@ -406,7 +406,7 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: public.ecr.aws
|
||||
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
username: ${{ vars.AWS_ACCESS_KEY_ID }}
|
||||
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
env:
|
||||
AWS_REGION: <region>
|
||||
@@ -440,7 +440,7 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: <region>.ocir.io
|
||||
username: ${{ secrets.OCI_USERNAME }}
|
||||
username: ${{ vars.OCI_USERNAME }}
|
||||
password: ${{ secrets.OCI_TOKEN }}
|
||||
```
|
||||
|
||||
@@ -467,7 +467,7 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: quay.io
|
||||
username: ${{ secrets.QUAY_USERNAME }}
|
||||
username: ${{ vars.QUAY_USERNAME }}
|
||||
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
|
||||
```
|
||||
|
||||
@@ -491,10 +491,47 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: registry.digitalocean.com
|
||||
username: ${{ secrets.DIGITALOCEAN_USERNAME }}
|
||||
username: ${{ vars.DIGITALOCEAN_USERNAME }}
|
||||
password: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
||||
```
|
||||
|
||||
### Buildkite Package Registry
|
||||
|
||||
Use your Buildkite registered email address to generate an API access token to authenticate. U
|
||||
|
||||
```yaml
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
|
||||
jobs:
|
||||
login:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Login to Buildkite Package Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: packages.buildkite.com
|
||||
username: buildkite #All usernames to buildkite packages is "buildkite".
|
||||
password: ${{ secrets.BUILDKITE_ACCESS_TOKEN }}
|
||||
```
|
||||
**Useful references:**
|
||||
[Buildkite package Registry](https://buildkite.com/docs/package-registries)
|
||||
|
||||
Go to your Buildkite Org/Buildkite Package registry to generate a token
|
||||
|
||||
**Working pipeline example:** [https://gist.github.com/kleeadrian/f096878f76b5fb759976adce9550c9a5](https://gist.github.com/kleeadrian/f096878f76b5fb759976adce9550c9a5)
|
||||
|
||||
**Scope required:**
|
||||
```
|
||||
read_registries
|
||||
write_registries
|
||||
read_packages
|
||||
write_packages
|
||||
```
|
||||
## Customizing
|
||||
|
||||
### inputs
|
||||
|
||||
24
dist/index.js
generated
vendored
24
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -25,10 +25,10 @@
|
||||
"license": "Apache-2.0",
|
||||
"packageManager": "yarn@3.6.3",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@aws-sdk/client-ecr": "^3.583.0",
|
||||
"@aws-sdk/client-ecr-public": "^3.583.0",
|
||||
"@docker/actions-toolkit": "^0.35.0",
|
||||
"@actions/core": "^1.11.1",
|
||||
"@aws-sdk/client-ecr": "^3.664.0",
|
||||
"@aws-sdk/client-ecr-public": "^3.664.0",
|
||||
"@docker/actions-toolkit": "^0.42.0",
|
||||
"http-proxy-agent": "^7.0.2",
|
||||
"https-proxy-agent": "^7.0.5"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user