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

Merge pull request #1451 from crazy-max/fix-git-auth-token

scope default git auth token to github.com
This commit is contained in:
CrazyMax 2026-02-10 16:55:36 +01:00 committed by GitHub
commit f477955db5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View file

@ -232,7 +232,7 @@ ccc"`],
[
'build',
'--output', '.',
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'--secret', `id=GIT_AUTH_TOKEN.github.com,src=${tmpName}`,
'https://github.com/docker/build-push-action.git#refs/heads/master'
],
undefined
@ -478,7 +478,7 @@ nproc=3`],
[
'build',
'--iidfile', imageIDFilePath,
'--secret', `id=GIT_AUTH_TOKEN,src=${tmpName}`,
'--secret', `id=GIT_AUTH_TOKEN.github.com,src=${tmpName}`,
'--metadata-file', metadataJson,
'https://github.com/docker/build-push-action.git#refs/heads/master:subdir'
],

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=${inputs['github-token']}`));
args.push('--secret', Build.resolveSecretString(`GIT_AUTH_TOKEN.github.com=${inputs['github-token']}`));
}
if (inputs['shm-size']) {
args.push('--shm-size', inputs['shm-size']);