diff --git a/dist/index.js b/dist/index.js index 4abb551..8793b19 100644 --- a/dist/index.js +++ b/dist/index.js @@ -51855,11 +51855,17 @@ const slab = __nccwpck_require__(4156) const config = __nccwpck_require__(4570) const core = __nccwpck_require__(2186) const { waitForRunnerRegistered } = __nccwpck_require__(6989) +const utils = __nccwpck_require__(1608) function setOutput(label) { core.setOutput('label', label) } +process.on('SIGINT', function () { + core.info('CANCEL caught !!!') + process.exit() +}) + async function start() { const provider = config.input.backend @@ -51886,6 +51892,9 @@ async function start() { )}` ) + core.info('[DEBUG] About to wait 30 seconds for cancelation') // DEBUG + await utils.sleep(30) // DEBUG + try { const wait_instance_response = await slab.waitForInstance( start_instance_response.task_id, diff --git a/src/index.js b/src/index.js index 57019a7..1950b58 100644 --- a/src/index.js +++ b/src/index.js @@ -2,11 +2,17 @@ const slab = require('./slab') const config = require('./config') const core = require('@actions/core') const { waitForRunnerRegistered } = require('./gh') +const utils = require('./utils') function setOutput(label) { core.setOutput('label', label) } +process.on('SIGINT', function () { + core.info('CANCEL caught !!!') + process.exit() +}) + async function start() { const provider = config.input.backend @@ -33,6 +39,9 @@ async function start() { )}` ) + core.info('[DEBUG] About to wait 30 seconds for cancelation') // DEBUG + await utils.sleep(30) // DEBUG + try { const wait_instance_response = await slab.waitForInstance( start_instance_response.task_id,