File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change 11const core = require ( '@actions/core' ) ;
2- const github = require ( '@actions/core ' ) ;
2+ const github = require ( '@actions/github ' ) ;
33
4- async function run ( ) {
5- try {
6- const nameToGreet = core . getInput ( 'who-to-greet' ) ;
7- core . debug ( `Hello ${ nameToGreet } !` ) ;
8- const time = ( new Date ( ) ) . toTimeString ( ) ;
9- core . setOutput ( "time" , time ) ;
10- } catch ( error ) {
11- core . setFailed ( error . message ) ;
12- }
4+ try {
5+ const nameToGreet = core . getInput ( 'who-to-greet' ) ;
6+ console . log ( `Hello ${ nameToGreet } !` ) ;
7+ const time = ( new Date ( ) ) . toTimeString ( ) ;
8+ core . setOutput ( "time" , time ) ;
9+ const payload = JSON . stringify ( github . context . payload , undefined , 2 )
10+ console . log ( `The event payload: ${ payload } ` ) ;
11+ } catch ( error ) {
12+ core . setFailed ( error . message ) ;
1313}
14-
15- run ( ) ;
You can’t perform that action at this time.
0 commit comments