Compare commits

..

2 Commits

Author SHA1 Message Date
CrazyMax
271085216c chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-06 14:13:45 +01:00
CrazyMax
c92b895f48 Add scope input to set scopes for the authentication token
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-06 14:05:59 +01:00
4 changed files with 7 additions and 13 deletions

View File

@@ -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

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -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;
};