Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf23fb2a

Browse files
authored
Merge pull request#1133 from crazy-max/gha-cache-to
set repository and ghtoken attributes for gha cache type
2 parents1a16264 +ef76d10 commitf23fb2a

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

‎__tests__/context.test.ts‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,27 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`]
799799
'.'
800800
]
801801
],
802+
[
803+
34,
804+
'0.14.1',
805+
newMap<string,string>([
806+
['context','.'],
807+
['load','false'],
808+
['no-cache','false'],
809+
['push','false'],
810+
['pull','false'],
811+
['cache-to','type=gha'],
812+
['github-token',`abcd1234`],
813+
]),
814+
[
815+
'build',
816+
'--cache-to','type=gha,repository=docker/build-push-action,ghtoken=abcd1234',
817+
'--iidfile',imageIDFilePath,
818+
'--attest',`type=provenance,mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789/attempts/1`,
819+
'--metadata-file',metadataJson,
820+
'.'
821+
]
822+
],
802823
])(
803824
'[%d] given %p with %p as inputs, returns %p',
804825
async(num:number,buildxVersion:string,inputs:Map<string,string>,expected:Array<string>)=>{

‎dist/index.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing 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 aboutcustomizing how changed files appear on GitHub.

‎src/context.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
139139
args.push('--cache-from',cacheFrom);
140140
});
141141
awaitUtil.asyncForEach(inputs['cache-to'],asynccacheTo=>{
142-
args.push('--cache-to',cacheTo);
142+
args.push('--cache-to',Build.resolveCacheToAttrs(cacheTo,inputs['github-token']));
143143
});
144144
if(inputs['cgroup-parent']){
145145
args.push('--cgroup-parent',inputs['cgroup-parent']);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp