Skip to content

Commit

Permalink
Fix GitHub token not passed with Git context if subdir defined
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Aug 3, 2022
1 parent 67af6dc commit 523707a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/context.ts
Expand Up @@ -166,7 +166,7 @@ async function getBuildArgs(inputs: Inputs, defaultContext: string, buildxVersio
core.warning(err.message);
}
});
if (inputs.githubToken && !buildx.hasGitAuthToken(inputs.secrets) && inputs.context == defaultContext) {
if (inputs.githubToken && !buildx.hasGitAuthToken(inputs.secrets) && inputs.context.startsWith(defaultContext)) {
args.push('--secret', await buildx.getSecretString(`GIT_AUTH_TOKEN=${inputs.githubToken}`));
}
if (inputs.shmSize) {
Expand Down

0 comments on commit 523707a

Please sign in to comment.