File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 with :
1111 limit-access-to-actor : true
1212 detached : true
13+ connect-timeout-seconds : 60
1314 - run : |
1415 echo "A busy loop"
1516 for value in $(seq 10)
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ inputs:
2525 description : ' In detached mode, the workflow job will continue while the tmate session is active'
2626 required : false
2727 default : ' false'
28+ connect-timeout-seconds :
29+ description : ' How long in seconds to wait for a connection to be established'
30+ required : false
31+ default : ' 600'
2832 tmate-server-host :
2933 description : ' The hostname for your tmate server (e.g. ssh.example.org)'
3034 required : false
Original file line number Diff line number Diff line change @@ -17435,7 +17435,13 @@ async function run() {
1743517435 && '0' !== await execShellCommand(`${tmate} display -p '#{tmate_num_clients}'`, { quiet: true })
1743617436 }
1743717437 })()
17438- for (let seconds = 10 * 60; seconds > 0; ) {
17438+
17439+ let connectTimeoutSeconds = parseInt(core.getInput("connect-timeout-seconds"))
17440+ if (Number.isNaN(connectTimeoutSeconds) || connectTimeoutSeconds <= 0) {
17441+ connectTimeoutSeconds = 10 * 60
17442+ }
17443+
17444+ for (let seconds = connectTimeoutSeconds; seconds > 0; ) {
1743917445 console.log(`${
1744017446 await hasAnyoneConnectedYet()
1744117447 ? 'Waiting for session to end'
Original file line number Diff line number Diff line change @@ -49,7 +49,13 @@ export async function run() {
4949 && '0' !== await execShellCommand ( `${ tmate } display -p '#{tmate_num_clients}'` , { quiet : true } )
5050 }
5151 } ) ( )
52- for ( let seconds = 10 * 60 ; seconds > 0 ; ) {
52+
53+ let connectTimeoutSeconds = parseInt ( core . getInput ( "connect-timeout-seconds" ) )
54+ if ( Number . isNaN ( connectTimeoutSeconds ) || connectTimeoutSeconds <= 0 ) {
55+ connectTimeoutSeconds = 10 * 60
56+ }
57+
58+ for ( let seconds = connectTimeoutSeconds ; seconds > 0 ; ) {
5359 console . log ( `${
5460 await hasAnyoneConnectedYet ( )
5561 ? 'Waiting for session to end'
You can’t perform that action at this time.
0 commit comments