mirror of
https://github.com/docker/login-action.git
synced 2026-10-18 12:23:06 +01:00
Compare commits
2 Commits
271085216c
...
20e0a61734
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20e0a61734 | ||
|
|
f40589c4bf |
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -375,7 +375,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
scope: push
|
scope: '@push'
|
||||||
-
|
-
|
||||||
name: Print config.json files
|
name: Print config.json files
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -405,7 +405,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
scope: docker/buildx-bin@push
|
scope: 'docker/buildx-bin@push'
|
||||||
-
|
-
|
||||||
name: Print config.json files
|
name: Print config.json files
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -436,7 +436,7 @@ jobs:
|
|||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
scope: push
|
scope: '@push'
|
||||||
-
|
-
|
||||||
name: Print config.json files
|
name: Print config.json files
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -467,7 +467,7 @@ jobs:
|
|||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
scope: docker/login-action@push
|
scope: 'docker/login-action@push'
|
||||||
-
|
-
|
||||||
name: Print config.json files
|
name: Print config.json files
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
2
dist/index.js
generated
vendored
2
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
@@ -55,8 +55,14 @@ export async function loginECR(registry: string, username: string, password: str
|
|||||||
async function loginExec(registry: string, username: string, password: string, scope?: string): Promise<void> {
|
async function loginExec(registry: string, username: string, password: string, scope?: string): Promise<void> {
|
||||||
let envs: {[key: string]: string} | undefined;
|
let envs: {[key: string]: string} | undefined;
|
||||||
if (scope && scope.length > 0) {
|
if (scope && scope.length > 0) {
|
||||||
|
let dockerConfigDir = path.join(Buildx.configDir, 'config', registry === 'docker.io' ? 'registry-1.docker.io' : registry);
|
||||||
|
if (scope.startsWith('@')) {
|
||||||
|
dockerConfigDir += scope;
|
||||||
|
} else {
|
||||||
|
dockerConfigDir = path.join(dockerConfigDir, scope);
|
||||||
|
}
|
||||||
envs = Object.assign({}, process.env, {
|
envs = Object.assign({}, process.env, {
|
||||||
DOCKER_CONFIG: path.join(Buildx.configDir, 'config', registry, scope)
|
DOCKER_CONFIG: dockerConfigDir
|
||||||
}) as {
|
}) as {
|
||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user