File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ const { access } = require('fs').promises;
88const { join } = require ( 'path' ) ;
99
1010// Inputs
11- const pushToBranch = Boolean ( core . getInput ( 'pushToBranch' ) ) ;
11+ const pushToBranch = core . getInput ( 'pushToBranch' ) ;
1212const branchName = core . getInput ( 'branch' ) ;
1313const githubToken = core . getInput ( 'githubToken' ) ;
1414const directory = process . env . GITHUB_WORKSPACE ;
1515
16- if ( pushToBranch && ! githubToken ) return exit ( 'A GitHub secret token is a required input for pushing code (hint: use ${{ secrets.GITHUB_TOKEN }} )' ) ;
16+ if ( pushToBranch == true && ! githubToken ) return exit ( 'A GitHub secret token is a required input for pushing code (hint: use ${{ secrets.GITHUB_TOKEN }} )' ) ;
1717
1818( async ( ) => {
1919 const tsconfigPath = join ( directory , 'tsconfig.json' ) ;
@@ -34,7 +34,7 @@ if (pushToBranch && !githubToken) return exit('A GitHub secret token is a requir
3434 // Build project
3535 const build = await exec ( `tsc` , [ ] , { cwd : directory } ) ;
3636 if ( build !== 0 ) return exit ( 'Something went wrong while building.' ) ;
37- if ( ! pushToBranch ) return process . exit ( 0 ) ;
37+ if ( pushToBranch == 'false' ) return process . exit ( 0 ) ;
3838
3939 const octokit = github . getOctokit ( githubToken ) ;
4040
You can’t perform that action at this time.
0 commit comments