Skip to content

Commit 710e335

Browse files
committed
derive GIT_AUTH_TOKEN host from GitHub server URL
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent ee4ca42 commit 710e335

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
183183
}
184184
});
185185
if (inputs['github-token'] && !Build.hasGitAuthTokenSecret(inputs.secrets) && context.startsWith(Context.gitContext())) {
186-
args.push('--secret', Build.resolveSecretString(`GIT_AUTH_TOKEN.github.com=${inputs['github-token']}`));
186+
args.push('--secret', Build.resolveSecretString(`GIT_AUTH_TOKEN.${new URL(GitHub.serverURL).hostname.trimEnd()}=${inputs['github-token']}`));
187187
}
188188
if (inputs['shm-size']) {
189189
args.push('--shm-size', inputs['shm-size']);

0 commit comments

Comments
 (0)