File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import {Build} from '../src/buildx/build';
2525import { Exec } from '../src/exec' ;
2626import { GitHub } from '../src/github' ;
2727import { History } from '../src/buildx/history' ;
28+ import { Util } from '../src/util' ;
2829
2930const fixturesDir = path . join ( __dirname , '.fixtures' ) ;
3031const tmpDir = fs . mkdtempSync ( path . join ( process . env . TEMP || os . tmpdir ( ) , 'github-itg-' ) ) ;
@@ -33,8 +34,10 @@ const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'tr
3334
3435maybe ( 'uploadArtifact' , ( ) => {
3536 it ( 'uploads an artifact' , async ( ) => {
37+ const filename = path . join ( tmpDir , `github-repo-${ Util . generateRandomString ( ) } .json` ) ;
38+ fs . copyFileSync ( path . join ( fixturesDir , `github-repo.json` ) , filename ) ;
3639 const res = await GitHub . uploadArtifact ( {
37- filename : path . join ( fixturesDir , 'github-repo.json' ) ,
40+ filename : filename ,
3841 mimeType : 'application/json' ,
3942 retentionDays : 1
4043 } ) ;
You can’t perform that action at this time.
0 commit comments