File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,10 +30,15 @@ async function run(): Promise<void> {
3030
3131 // Create the oprhan github-meta branch if it doesn't exist
3232 const branch = core . getInput ( 'branch' )
33- const branchExists =
34- execSync ( `git branch --list ${ branch } ` ) . toString ( ) . trim ( ) !== ''
33+ const branchExists = await exec ( 'git' , [
34+ 'fetch' ,
35+ 'origin' ,
36+ branch ,
37+ '--depth' ,
38+ '1' ,
39+ ] )
3540
36- if ( ! branchExists ) {
41+ if ( branchExists !== 0 ) {
3742 core . info ( `No ${ branch } branch exists, creating...` )
3843 await exec ( 'git' , [ 'checkout' , '--orphan' , branch ] )
3944 await exec ( 'git' , [ 'rm' , '-rf' , '.' ] )
@@ -46,7 +51,6 @@ async function run(): Promise<void> {
4651 } else {
4752 core . info ( `Checking out ${ branch } ` )
4853 await exec ( 'git' , [ 'checkout' , '-t' , `origin/${ branch } ` ] )
49- await exec ( 'git' , [ 'pull' ] )
5054 }
5155
5256 // open the database
You can’t perform that action at this time.
0 commit comments