Skip to content

Commit 601a80b

Browse files
authored
Merge pull request #1456 from crazy-max/auth-token-dyn-host
derive GIT_AUTH_TOKEN host from GitHub server URL
2 parents ee4ca42 + 8f7fd7c commit 601a80b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)