File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -79,20 +79,18 @@ core.info(`Running in ${baseDir}`)
7979 } else core . info ( '> Not pulling from repo.' )
8080
8181 core . info ( '> Creating commit...' )
82- const commitData = await git
82+ await git
8383 . commit ( getInput ( 'message' ) , matchGitArgs ( getInput ( 'commit' ) || '' ) )
84- . catch ( ( err ) => {
85- log ( err )
84+ . then ( async ( data ) => {
85+ log ( undefined , data )
86+ setOutput ( 'committed' , 'true' )
87+ setOutput ( 'commit_sha' , data . commit )
88+ await git
89+ . revparse ( data . commit )
90+ . then ( ( long_sha ) => setOutput ( 'commit_long_sha' , long_sha ) )
91+ . catch ( ( err ) => core . warning ( `Couldn't parse long SHA:\n${ err } ` ) )
8692 } )
87- if ( commitData ) {
88- log ( undefined , commitData )
89- setOutput ( 'committed' , 'true' )
90- setOutput ( 'commit_sha' , commitData . commit )
91- await git
92- . revparse ( commitData . commit )
93- . then ( ( long_sha ) => setOutput ( 'commit_long_sha' , long_sha ) )
94- . catch ( ( err ) => core . warning ( `Couldn't parse long SHA:\n${ err } ` ) )
95- }
93+ . catch ( ( err ) => core . setFailed ( err ) )
9694
9795 if ( getInput ( 'tag' ) ) {
9896 core . info ( '> Tagging commit...' )
You can’t perform that action at this time.
0 commit comments