21 lines
448 B
TypeScript
21 lines
448 B
TypeScript
import * as core from '@actions/core';
|
|
|
|
async function run() {
|
|
try {
|
|
// Get input defined in action.yml
|
|
const exampleInput = core.getInput('example-input');
|
|
console.log(`Input received: ${exampleInput}`);
|
|
|
|
// Do something with the input
|
|
// ...
|
|
|
|
// Set output
|
|
core.setOutput('example-output', 'some value');
|
|
} catch (error) {
|
|
if (error instanceof Error) {
|
|
core.setFailed(error.message);
|
|
}
|
|
}
|
|
}
|
|
|
|
run();
|