|
1 | | -const core = require('@actions/core') |
2 | | -const { wait } = require('./wait') |
| 1 | +const core = require('@actions/core'); |
| 2 | +const { wait } = require('./wait'); |
3 | 3 |
|
4 | 4 | /** |
5 | 5 | * The main function for the action. |
6 | 6 | * @returns {Promise<void>} Resolves when the action is complete. |
7 | 7 | */ |
8 | 8 | async function run() { |
9 | | - try { |
10 | | - const ms = core.getInput('milliseconds', { required: true }) |
| 9 | + try { |
| 10 | + const ms = core.getInput('milliseconds', { required: true }); |
11 | 11 |
|
12 | | - // Debug logs are only output if the `ACTIONS_STEP_DEBUG` secret is true |
13 | | - core.debug(`Waiting ${ms} milliseconds ...`) |
| 12 | + // Debug logs are only output if the `ACTIONS_STEP_DEBUG` secret is true |
| 13 | + core.debug(`Waiting ${ms} milliseconds ...`); |
14 | 14 |
|
15 | | - // Log the current timestamp, wait, then log the new timestamp |
16 | | - core.debug(new Date().toTimeString()) |
17 | | - await wait(parseInt(ms, 10)) |
18 | | - core.debug(new Date().toTimeString()) |
| 15 | + // Log the current timestamp, wait, then log the new timestamp |
| 16 | + core.debug(new Date().toTimeString()); |
| 17 | + await wait(parseInt(ms, 10)); |
| 18 | + core.debug(new Date().toTimeString()); |
19 | 19 |
|
20 | | - // Set outputs for other workflow steps to use |
21 | | - core.setOutput('time', new Date().toTimeString()) |
22 | | - } catch (error) { |
23 | | - // Fail the workflow run if an error occurs |
24 | | - core.setFailed(error.message) |
25 | | - } |
| 20 | + // Set outputs for other workflow steps to use |
| 21 | + core.setOutput('time', new Date().toTimeString()); |
| 22 | + } catch (error) { |
| 23 | + // Fail the workflow run if an error occurs |
| 24 | + core.setFailed(error.message); |
| 25 | + } |
26 | 26 | } |
27 | 27 |
|
28 | 28 | module.exports = { |
29 | | - run |
30 | | -} |
| 29 | + run, |
| 30 | +}; |
0 commit comments