actions-hugo/index.js

33 lines
786 B
JavaScript
Raw Normal View History

const core = require('@actions/core');
2019-09-15 17:22:08 +02:00
// const wait = require('./wait');
2019-09-15 17:22:08 +02:00
let hugoVersion = '';
// most @actions toolkit packages have async methods
async function run() {
2019-09-15 13:24:31 +02:00
try {
2019-09-15 17:04:26 +02:00
// const ms = core.getInput('milliseconds');
// console.log(`Waiting ${ms} milliseconds ...`)
2019-09-15 17:04:26 +02:00
// core.debug((new Date()).toTimeString())
// wait(parseInt(ms));
// core.debug((new Date()).toTimeString())
2019-09-15 17:04:26 +02:00
// core.setOutput('time', new Date().toTimeString());
2019-09-15 13:24:31 +02:00
2019-09-15 17:22:08 +02:00
hugoVersion = core.getInput('hugo-version');
if (!hugoVersion) {
hugoVersion = 'latest';
}
2019-09-15 13:24:31 +02:00
console.log('Hugo version:', hugoVersion);
const extended = core.getInput('extended');
console.log('Hugo extended:', extended);
}
catch (error) {
core.setFailed(error.message);
}
}
run()