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