测试
This commit is contained in:
+4
-20
@@ -27246,20 +27246,6 @@ function requireCore () {
|
||||
|
||||
var coreExports = requireCore();
|
||||
|
||||
/**
|
||||
* Waits for a number of milliseconds.
|
||||
*
|
||||
* @param milliseconds The number of milliseconds to wait.
|
||||
* @returns Resolves with 'done!' after the wait is over.
|
||||
*/
|
||||
async function wait(milliseconds) {
|
||||
return new Promise((resolve) => {
|
||||
if (isNaN(milliseconds))
|
||||
throw new Error('milliseconds is not a number');
|
||||
setTimeout(() => resolve('done!'), milliseconds);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* The main function for the action.
|
||||
*
|
||||
@@ -27267,15 +27253,13 @@ async function wait(milliseconds) {
|
||||
*/
|
||||
async function run() {
|
||||
try {
|
||||
const ms = coreExports.getInput('milliseconds');
|
||||
const image = coreExports.getInput('image');
|
||||
// Debug logs are only output if the `ACTIONS_STEP_DEBUG` secret is true
|
||||
coreExports.debug(`Waiting ${ms} milliseconds ...`);
|
||||
console.log('image', image);
|
||||
const branch = String(process.env.GITHUB_REF_NAME);
|
||||
console.log('branch', branch);
|
||||
// Log the current timestamp, wait, then log the new timestamp
|
||||
coreExports.debug(new Date().toTimeString());
|
||||
await wait(parseInt(ms, 10));
|
||||
coreExports.debug(new Date().toTimeString());
|
||||
// Set outputs for other workflow steps to use
|
||||
coreExports.setOutput('time', new Date().toTimeString());
|
||||
}
|
||||
catch (error) {
|
||||
// Fail the workflow run if an error occurs
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user