File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 88 description : ' Arguments to pass to the Dockerfile entrypoint.'
99 required : true
1010 default : ' --help'
11+ debug :
12+ description : ' Whether to enable debug mode.'
13+ required : false
14+ default : ' false'
1115outputs :
1216 command :
1317 description : ' The command that was executed.'
@@ -18,7 +22,8 @@ outputs:
1822runs :
1923 using : ' docker'
2024 image : ' Dockerfile'
21- # env:
25+ env :
26+ DEBUG : ${{ inputs.debug }}
2227 # GITHUB_TOKEN is already available in the action container context
2328 # but be sure that it has 'writer' permissions on the target repository.
2429 args :
Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ if [ -z "$GITHUB_TOKEN" ]; then
77 exit 1
88fi
99
10+ if [[ " $DEBUG " == " true" ]]; then
11+ echo " first arg"
12+ echo $1
13+ echo " all args:"
14+ echo $@
15+ fi
16+
1017argv=(node /app/github.js " $@ " )
1118cmd=$( printf ' %q ' " ${argv[@]} " )
1219eval $cmd
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ const error = (...args) => {
4545} ;
4646
4747const debug = ( ...args ) => {
48- if ( ! ! process . env . DEBUG ) {
48+ if ( ! ! process . env . DEBUG && process . env . DEBUG === "true" ) {
4949 const prefix = getPrefix ( "DEBUG" ) ;
5050 console . log ( prefix , ...args ) ;
5151 }
You can’t perform that action at this time.
0 commit comments