@@ -28,7 +28,7 @@ import * as path from 'path';
2828
2929import { Client } from './client' ;
3030import { parseHeadersInput } from './headers' ;
31- import { absoluteRootAndComputedGlob , expandGlob } from './util' ;
31+ import { absoluteRootAndComputedGlob , deepClone , expandGlob } from './util' ;
3232
3333const NO_FILES_WARNING =
3434 `There are no files to upload! Make sure the workflow uses the "checkout"` +
@@ -76,12 +76,12 @@ export async function run(): Promise<void> {
7676
7777 // Compute the absolute root and compute the glob.
7878 const [ absoluteRoot , computedGlob ] = await absoluteRootAndComputedGlob ( root , glob ) ;
79- core . debug ( `computed absoluteRoot from "${ root } " to "${ absoluteRoot } "` ) ;
80- core . debug ( `computed computedGlob from "${ glob } " to "${ computedGlob } "` ) ;
79+ core . debug ( `Computed absoluteRoot from "${ root } " to "${ absoluteRoot } "` ) ;
80+ core . debug ( `Computed computedGlob from "${ glob } " to "${ computedGlob } "` ) ;
8181
8282 // Build complete file list.
8383 const files = await expandGlob ( absoluteRoot , computedGlob ) ;
84- core . debug ( `found ${ files . length } files: ${ JSON . stringify ( files ) } ` ) ;
84+ core . debug ( `Found ${ files . length } files: ${ JSON . stringify ( files ) } ` ) ;
8585
8686 // Process ignores:
8787 //
@@ -129,6 +129,7 @@ export async function run(): Promise<void> {
129129 }
130130
131131 // Create the client and upload files.
132+ core . startGroup ( 'Upload files' ) ;
132133 const client = new Client ( {
133134 credentials : credentials ,
134135 projectID : projectID ,
@@ -144,10 +145,19 @@ export async function run(): Promise<void> {
144145 resumable : resumable ,
145146 predefinedAcl : predefinedAcl ,
146147
147- onUploadObject : ( source : string , destination : string ) => {
148+ onUploadObject : ( source : string , destination : string , opts : Record < string , unknown > ) => {
148149 core . info ( `Uploading ${ source } to gs://${ destination } ` ) ;
150+
151+ if ( core . isDebug ( ) ) {
152+ const data = deepClone ( opts ) ;
153+ data [ 'ts' ] = Date . now ( ) ;
154+ data [ 'source' ] = source ;
155+ data [ 'destination' ] = destination ;
156+ core . debug ( `Uploading: ${ JSON . stringify ( data ) } ` ) ;
157+ }
149158 } ,
150159 } ) ;
160+ core . endGroup ( ) ;
151161
152162 core . setOutput ( 'uploaded' , uploadResponses . join ( ',' ) ) ;
153163 } catch ( err ) {
0 commit comments