8
0
Fork 0
mirror of https://github.com/docker/build-push-action.git synced 2026-02-12 00:39:22 +00:00

Merge pull request #1456 from crazy-max/auth-token-dyn-host

derive GIT_AUTH_TOKEN host from GitHub server URL
This commit is contained in:
CrazyMax 2026-02-11 16:43:48 +01:00 committed by GitHub
commit 601a80b39c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

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

@ -183,7 +183,7 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
}
});
if (inputs['github-token'] && !Build.hasGitAuthTokenSecret(inputs.secrets) && context.startsWith(Context.gitContext())) {
args.push('--secret', Build.resolveSecretString(`GIT_AUTH_TOKEN.github.com=${inputs['github-token']}`));
args.push('--secret', Build.resolveSecretString(`GIT_AUTH_TOKEN.${new URL(GitHub.serverURL).hostname.trimEnd()}=${inputs['github-token']}`));
}
if (inputs['shm-size']) {
args.push('--shm-size', inputs['shm-size']);