mirror of
https://github.com/docker/login-action.git
synced 2026-06-10 14:49:19 +00:00
Compare commits
8 Commits
dependabot
...
ci-ecr-oid
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb1946f59c | ||
|
|
946f94de75 | ||
|
|
f50e5f80f8 | ||
|
|
c5e5fd0017 | ||
|
|
60e5331f1c | ||
|
|
6a848e5a16 | ||
|
|
0267638d8a | ||
|
|
250c56f969 |
127
.github/workflows/ci.yml
vendored
127
.github/workflows/ci.yml
vendored
@@ -7,6 +7,9 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
GHCR_TEST_IMAGE: ghcr.io/docker/login-action-test:ci-${{ github.sha }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -56,8 +59,39 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
logout: ${{ matrix.logout }}
|
logout: ${{ matrix.logout }}
|
||||||
|
|
||||||
|
push-ghcr:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
-
|
||||||
|
name: Login to GitHub Container Registry
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Build and push test image
|
||||||
|
run: |
|
||||||
|
docker buildx build --push -t "${GHCR_TEST_IMAGE}" - <<EOF
|
||||||
|
FROM scratch
|
||||||
|
LABEL org.opencontainers.image.title="docker/login-action CI test image"
|
||||||
|
LABEL org.opencontainers.image.description="Empty image used by CI to verify GHCR authentication."
|
||||||
|
LABEL org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}"
|
||||||
|
EOF
|
||||||
|
|
||||||
dind:
|
dind:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- push-ghcr
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: read
|
||||||
env:
|
env:
|
||||||
DOCKER_CONFIG: $HOME/.docker
|
DOCKER_CONFIG: $HOME/.docker
|
||||||
steps:
|
steps:
|
||||||
@@ -69,19 +103,19 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ secrets.GHCR_USERNAME }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GHCR_PAT }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: DinD
|
name: DinD
|
||||||
uses: docker://docker:29.3@sha256:4d90f1f6c400315c2dba96d3ec93c01e64198395cbba04f79d12adce4f737029
|
uses: docker://docker:29.3@sha256:4d90f1f6c400315c2dba96d3ec93c01e64198395cbba04f79d12adce4f737029
|
||||||
with:
|
with:
|
||||||
entrypoint: docker
|
entrypoint: docker
|
||||||
args: pull ghcr.io/docker-ghactiontest/test
|
args: pull ${{ env.GHCR_TEST_IMAGE }}
|
||||||
-
|
-
|
||||||
name: Pull private image
|
name: Pull test image
|
||||||
run: |
|
run: |
|
||||||
docker image prune -a -f >/dev/null 2>&1
|
docker image prune -a -f >/dev/null 2>&1
|
||||||
docker pull ghcr.io/docker-ghactiontest/test
|
docker pull "${GHCR_TEST_IMAGE}"
|
||||||
|
|
||||||
acr:
|
acr:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -93,7 +127,7 @@ jobs:
|
|||||||
name: Login to ACR
|
name: Login to ACR
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.AZURE_REGISTRY_NAME }}.azurecr.io
|
registry: officialgithubactions.azurecr.io
|
||||||
username: ${{ secrets.AZURE_CLIENT_ID }}
|
username: ${{ secrets.AZURE_CLIENT_ID }}
|
||||||
password: ${{ secrets.AZURE_CLIENT_SECRET }}
|
password: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||||
|
|
||||||
@@ -113,8 +147,8 @@ jobs:
|
|||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERPUBLICBOT_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERPUBLICBOT_READ_PAT }}
|
||||||
|
|
||||||
ecr:
|
ecr:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -132,7 +166,7 @@ jobs:
|
|||||||
name: Login to ECR
|
name: Login to ECR
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.AWS_ACCOUNT_NUMBER }}.dkr.ecr.us-east-1.amazonaws.com
|
registry: 175142243308.dkr.ecr.us-east-1.amazonaws.com
|
||||||
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
|
||||||
@@ -159,7 +193,34 @@ jobs:
|
|||||||
name: Login to ECR
|
name: Login to ECR
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.AWS_ACCOUNT_NUMBER }}.dkr.ecr.us-east-1.amazonaws.com
|
registry: 175142243308.dkr.ecr.us-east-1.amazonaws.com
|
||||||
|
|
||||||
|
ecr-oidc:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
-
|
||||||
|
name: Configure AWS Credentials
|
||||||
|
uses: aws-actions/configure-aws-credentials@acca2b1b2070338fb9fd1ca27ecee81d687e58e5 # v6.1.2
|
||||||
|
with:
|
||||||
|
role-to-assume: arn:aws:iam::175142243308:role/official_gha_cicd_login_action
|
||||||
|
aws-region: us-east-1
|
||||||
|
-
|
||||||
|
name: Login to ECR
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
registry: 175142243308.dkr.ecr.us-east-1.amazonaws.com
|
||||||
|
|
||||||
ecr-public:
|
ecr-public:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -210,6 +271,34 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
registry: public.ecr.aws
|
registry: public.ecr.aws
|
||||||
|
|
||||||
|
ecr-public-oidc:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
-
|
||||||
|
name: Configure AWS Credentials
|
||||||
|
uses: aws-actions/configure-aws-credentials@acca2b1b2070338fb9fd1ca27ecee81d687e58e5 # v6.1.2
|
||||||
|
with:
|
||||||
|
role-to-assume: arn:aws:iam::175142243308:role/official_gha_cicd_login_action
|
||||||
|
aws-region: us-east-1
|
||||||
|
-
|
||||||
|
name: Login to Public ECR
|
||||||
|
continue-on-error: ${{ matrix.os == 'windows-latest' }}
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
registry: public.ecr.aws
|
||||||
|
|
||||||
ghcr:
|
ghcr:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -266,7 +355,7 @@ jobs:
|
|||||||
name: Login to Google Artifact Registry
|
name: Login to Google Artifact Registry
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.GAR_LOCATION }}-docker.pkg.dev
|
registry: us-east4-docker.pkg.dev
|
||||||
username: _json_key
|
username: _json_key
|
||||||
password: ${{ secrets.GAR_JSON_KEY }}
|
password: ${{ secrets.GAR_JSON_KEY }}
|
||||||
|
|
||||||
@@ -301,8 +390,8 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
registry-auth: |
|
registry-auth: |
|
||||||
- username: ${{ secrets.DOCKERHUB_USERNAME }}
|
- username: ${{ vars.DOCKERPUBLICBOT_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERPUBLICBOT_READ_PAT }}
|
||||||
- registry: ghcr.io
|
- registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -350,8 +439,8 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
registry-auth: |
|
registry-auth: |
|
||||||
- username: ${{ secrets.DOCKERHUB_USERNAME }}
|
- username: ${{ vars.DOCKERPUBLICBOT_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERPUBLICBOT_READ_PAT }}
|
||||||
-
|
-
|
||||||
name: Check
|
name: Check
|
||||||
run: |
|
run: |
|
||||||
@@ -376,8 +465,8 @@ jobs:
|
|||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERPUBLICBOT_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERPUBLICBOT_READ_PAT }}
|
||||||
scope: '@push'
|
scope: '@push'
|
||||||
-
|
-
|
||||||
name: Print config.json files
|
name: Print config.json files
|
||||||
@@ -406,8 +495,8 @@ jobs:
|
|||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ vars.DOCKERPUBLICBOT_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERPUBLICBOT_READ_PAT }}
|
||||||
scope: 'docker/buildx-bin@push'
|
scope: 'docker/buildx-bin@push'
|
||||||
-
|
-
|
||||||
name: Print config.json files
|
name: Print config.json files
|
||||||
|
|||||||
316
dist/index.cjs
generated
vendored
316
dist/index.cjs
generated
vendored
File diff suppressed because one or more lines are too long
8
dist/index.cjs.map
generated
vendored
8
dist/index.cjs.map
generated
vendored
File diff suppressed because one or more lines are too long
5
dist/licenses.txt
generated
vendored
5
dist/licenses.txt
generated
vendored
@@ -2821,12 +2821,11 @@ SOFTWARE.
|
|||||||
|
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
The following npm packages may be included in this product:
|
The following npm package may be included in this product:
|
||||||
|
|
||||||
- js-yaml@4.1.1
|
- js-yaml@4.1.1
|
||||||
- js-yaml@4.2.0
|
|
||||||
|
|
||||||
These packages each contain the following license:
|
This package contains the following license:
|
||||||
|
|
||||||
(The MIT License)
|
(The MIT License)
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
"@docker/actions-toolkit": "^0.91.0",
|
"@docker/actions-toolkit": "^0.91.0",
|
||||||
"http-proxy-agent": "^9.0.0",
|
"http-proxy-agent": "^9.0.0",
|
||||||
"https-proxy-agent": "^9.0.0",
|
"https-proxy-agent": "^9.0.0",
|
||||||
"js-yaml": "^4.2.0"
|
"js-yaml": "^4.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.39.3",
|
"@eslint/js": "^9.39.3",
|
||||||
|
|||||||
13
yarn.lock
13
yarn.lock
@@ -3276,7 +3276,7 @@ __metadata:
|
|||||||
globals: "npm:^17.3.0"
|
globals: "npm:^17.3.0"
|
||||||
http-proxy-agent: "npm:^9.0.0"
|
http-proxy-agent: "npm:^9.0.0"
|
||||||
https-proxy-agent: "npm:^9.0.0"
|
https-proxy-agent: "npm:^9.0.0"
|
||||||
js-yaml: "npm:^4.2.0"
|
js-yaml: "npm:^4.1.1"
|
||||||
prettier: "npm:^3.8.1"
|
prettier: "npm:^3.8.1"
|
||||||
typescript: "npm:^5.9.3"
|
typescript: "npm:^5.9.3"
|
||||||
vitest: "npm:^4.0.18"
|
vitest: "npm:^4.0.18"
|
||||||
@@ -4459,17 +4459,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"js-yaml@npm:^4.2.0":
|
|
||||||
version: 4.2.0
|
|
||||||
resolution: "js-yaml@npm:4.2.0"
|
|
||||||
dependencies:
|
|
||||||
argparse: "npm:^2.0.1"
|
|
||||||
bin:
|
|
||||||
js-yaml: bin/js-yaml.js
|
|
||||||
checksum: 10/51de2067a2b44b07ba5206132e56005f8b568ff279bb4d2f645068958c56fa4827d40a6841c983234671fa0a134bf094d0b0717873c2a3d319185297af145a6d
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"jsbn@npm:1.1.0":
|
"jsbn@npm:1.1.0":
|
||||||
version: 1.1.0
|
version: 1.1.0
|
||||||
resolution: "jsbn@npm:1.1.0"
|
resolution: "jsbn@npm:1.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user