File tree Expand file tree Collapse file tree 6 files changed +43
-41
lines changed Expand file tree Collapse file tree 6 files changed +43
-41
lines changed Original file line number Diff line number Diff line change 11# comment this out distribution branches
2- node_modules /
2+ # node_modules/
33
44# Editors
55.vscode
Original file line number Diff line number Diff line change 1- name : ' Wait'
2- description : ' Wait a designated number of milliseconds'
3- inputs :
4- milliseconds : # id of input
5- description : ' number of milliseconds to wait'
6- required : true
7- default : ' 1000'
8- outputs :
9- time : # output will be available to future steps
10- description : ' The message to output'
1+ name : ' Debugger'
2+ description : ' Interactive debugger for GitHub Action with tmate.io'
113runs :
124 using : ' node12'
135 main : ' index.js'
Original file line number Diff line number Diff line change 11const core = require ( '@actions/core' ) ;
2- const wait = require ( './wait' ) ;
32
4-
5- // most @actions toolkit packages have async methods
63async function run ( ) {
7- try {
8- const ms = core . getInput ( 'milliseconds' ) ;
9- console . log ( `Waiting ${ ms } milliseconds ...` )
10-
11- core . debug ( ( new Date ( ) ) . toTimeString ( ) )
12- wait ( parseInt ( ms ) ) ;
13- core . debug ( ( new Date ( ) ) . toTimeString ( ) )
14-
15- core . setOutput ( 'time' , new Date ( ) . toTimeString ( ) ) ;
16- }
4+ try {
5+ // This is just a thin wrapper around bash
6+ var child = require ( 'child_process' ) . execFile ( './script.sh' ) ;
7+ child . stdout . on ( 'data' , function ( data ) {
8+ console . log ( data . toString ( ) ) ;
9+ } ) ;
10+ }
1711 catch ( error ) {
1812 core . setFailed ( error . message ) ;
1913 }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ echo Setting up tmate
6+ if [ -x " $( command -v brew) " ]; then
7+ brew install tmate
8+ fi
9+
10+ if [ -x " $( command -v apt-get) " ]; then
11+ sudo apt-get install -y tmate openssh-client
12+ fi
13+
14+ [ -e ~ /.ssh/id_rsa ] || ssh-keygen -t rsa -f ~ /.ssh/id_rsa -q -N " "
15+
16+
17+ echo Running tmate
18+ tmate -S /tmp/tmate.sock new-session -d
19+ tmate -S /tmp/tmate.sock wait tmate-ready
20+ tmate -S /tmp/tmate.sock display -p ' #{tmate_ssh}'
21+
22+ while [ -S /tmp/tmate.sock ]; do
23+ echo -ne " ."
24+ sleep 1
25+ done
26+
27+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments