Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
superwunc committed Jun 17, 2024
1 parent b9333a8 commit b51b832
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 74 deletions.
74 changes: 15 additions & 59 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

18 changes: 4 additions & 14 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
import * as core from '@actions/core'
import core from '@actions/core'
import { wait } from './wait'

Check failure on line 2 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

'wait' is defined but never used

import fs from 'node:fs'
/**
* The main function for the action.
* @returns {Promise<void>} Resolves when the action is complete.
*/
export async function run(): Promise<void> {
try {
const ms: string = core.getInput('milliseconds')

// Debug logs are only output if the `ACTIONS_STEP_DEBUG` secret is true
core.debug(`Waiting ${ms} milliseconds ...`)

// Log the current timestamp, wait, then log the new timestamp
core.debug(new Date().toTimeString())
await wait(parseInt(ms, 10))
core.debug(new Date().toTimeString())

// Set outputs for other workflow steps to use
core.setOutput('time', new Date().toTimeString())
const www = fs.existsSync('dist')
core.setOutput('dist', www)

Check failure on line 11 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Delete `·`
} catch (error) {
// Fail the workflow run if an error occurs
if (error instanceof Error) core.setFailed(error.message)
Expand Down

0 comments on commit b51b832

Please sign in to comment.