File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,11 @@ function run() {
7272 core . info ( `✍️ Writing ${ fqdn } domain name to ${ path . join ( tmpdir , 'CNAME' ) } ` ) ;
7373 fs . writeFileSync ( path . join ( tmpdir , 'CNAME' ) , fqdn . trim ( ) ) ;
7474 }
75+ const dirty = child_process . execSync ( `git status --short` , { encoding : 'utf8' } ) . trim ( ) . length > 0 ;
76+ if ( keep_history && remote_branch_exists && ! dirty ) {
77+ core . info ( '⚠️ There are no changes to commit, stopping.' ) ;
78+ return ;
79+ }
7580 core . info ( `🔨 Configuring git committer to be ${ committer_name } <${ committer_email } >` ) ;
7681 yield exec . exec ( 'git' , [ 'config' , 'user.name' , committer_name ] ) ;
7782 yield exec . exec ( 'git' , [ 'config' , 'user.email' , committer_email ] ) ;
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ async function run() {
5959 fs . writeFileSync ( path . join ( tmpdir , 'CNAME' ) , fqdn . trim ( ) ) ;
6060 }
6161
62+ const dirty = child_process . execSync ( `git status --short` , { encoding : 'utf8' } ) . trim ( ) . length > 0 ;
63+ if ( keep_history && remote_branch_exists && ! dirty ) {
64+ core . info ( '⚠️ There are no changes to commit, stopping.' ) ;
65+ return ;
66+ }
67+
6268 core . info ( `🔨 Configuring git committer to be ${ committer_name } <${ committer_email } >` ) ;
6369 await exec . exec ( 'git' , [ 'config' , 'user.name' , committer_name ] ) ;
6470 await exec . exec ( 'git' , [ 'config' , 'user.email' , committer_email ] ) ;
You can’t perform that action at this time.
0 commit comments