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}`)
79
79
} else core . info ( '> Not pulling from repo.' )
80
80
81
81
core . info ( '> Creating commit...' )
82
- const commitData = await git
82
+ await git
83
83
. 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 } ` ) )
86
92
} )
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 ) )
96
94
97
95
if ( getInput ( 'tag' ) ) {
98
96
core . info ( '> Tagging commit...' )
You can’t perform that action at this time.
0 commit comments