Files
shockbot/index.ts
T
Colin McDonnell c5b1e63811 Create JS action
2025-08-27 16:53:48 -07:00

18 lines
639 B
TypeScript

import * as core from '@actions/core';
try {
// Get the message input parameter, with a default fallback
const message = core.getInput('message') || 'Hello from Pullfrog Action!';
// Print the message to console and GitHub Actions logs
console.log(`🐸 ${message}`);
core.info(`Action executed successfully: ${message}`);
// Set an output for potential use by other actions
core.setOutput('message', message);
} catch (error) {
// Handle any errors and fail the action
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
core.setFailed(`Action failed: ${errorMessage}`);
}