GeezerVison is showing github.com — Merge pull request #1458 from crazy-max/git-auth-port · docker/build-push-action@10e90e3
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: __tests__/context.test.ts +46Lines changed: 46 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -857,6 +857,52 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`] | 857 | 857 | ['BUILDX_NO_DEFAULT_ATTESTATIONS', '1'] | 858 | 858 | ]) | 859 | 859 | ], | | 860 | + [ | | 861 | + 35, | | 862 | + '0.13.1', | | 863 | + new Map<string, string>([ | | 864 | + ['github-token', 'abcdefghijklmno0123456789'], | | 865 | + ['context', '{{defaultContext}}'], | | 866 | + ['load', 'false'], | | 867 | + ['no-cache', 'false'], | | 868 | + ['push', 'false'], | | 869 | + ['pull', 'false'], | | 870 | + ]), | | 871 | + [ | | 872 | + 'build', | | 873 | + '--iidfile', imageIDFilePath, | | 874 | + '--attest', `type=provenance,mode=min,inline-only=true,builder-id=http://10.0.0.5:22827/docker/build-push-action/actions/runs/123456789/attempts/1`, | | 875 | + '--secret', `id=GIT_AUTH_TOKEN.10.0.0.5:22827,src=${tmpName}`, | | 876 | + '--metadata-file', metadataJson, | | 877 | + 'http://10.0.0.5:22827/docker/build-push-action.git#refs/heads/master' | | 878 | + ], | | 879 | + new Map<string, string>([ | | 880 | + ['GITHUB_SERVER_URL', 'http://10.0.0.5:22827'], | | 881 | + ]) | | 882 | + ], | | 883 | + [ | | 884 | + 36, | | 885 | + '0.13.1', | | 886 | + new Map<string, string>([ | | 887 | + ['github-token', 'abcdefghijklmno0123456789'], | | 888 | + ['context', '{{defaultContext}}'], | | 889 | + ['load', 'false'], | | 890 | + ['no-cache', 'false'], | | 891 | + ['push', 'false'], | | 892 | + ['pull', 'false'], | | 893 | + ]), | | 894 | + [ | | 895 | + 'build', | | 896 | + '--iidfile', imageIDFilePath, | | 897 | + '--attest', `type=provenance,mode=min,inline-only=true,builder-id=https://github.cds.internal.unity3d.com/docker/build-push-action/actions/runs/123456789/attempts/1`, | | 898 | + '--secret', `id=GIT_AUTH_TOKEN.github.cds.internal.unity3d.com,src=${tmpName}`, | | 899 | + '--metadata-file', metadataJson, | | 900 | + 'https://github.cds.internal.unity3d.com/docker/build-push-action.git#refs/heads/master' | | 901 | + ], | | 902 | + new Map<string, string>([ | | 903 | + ['GITHUB_SERVER_URL', 'https://github.cds.internal.unity3d.com'], | | 904 | + ]) | | 905 | + ], | 860 | 906 | ])( | 861 | 907 | '[%d] given %p with %p as inputs, returns %p', | 862 | 908 | async (num: number, buildxVersion: string, inputs: Map<string, string>, expected: Array<string>, envs: Map<string, string> | undefined) => { | |
Collapse file Copy file name to clipboardExpand all lines: dist/index.js +1-1Lines changed: 1 addition & 1 deletion Collapse file Copy file name to clipboardExpand all lines: dist/index.js.map +1-1Lines changed: 1 addition & 1 deletion Collapse file Copy file name to clipboardExpand all lines: src/context.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -183,7 +183,7 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit): | 183 | 183 | } | 184 | 184 | }); | 185 | 185 | if (inputs['github-token'] && !Build.hasGitAuthTokenSecret(inputs.secrets) && context.startsWith(Context.gitContext())) { | 186 | | - args.push('--secret', Build.resolveSecretString(`GIT_AUTH_TOKEN.${new URL(GitHub.serverURL).hostname.trimEnd()}=${inputs['github-token']}`)); | | 186 | + args.push('--secret', Build.resolveSecretString(`GIT_AUTH_TOKEN.${new URL(GitHub.serverURL).host.trimEnd()}=${inputs['github-token']}`)); | 187 | 187 | } | 188 | 188 | if (inputs['shm-size']) { | 189 | 189 | args.push('--shm-size', inputs['shm-size']); | |
|