Skip to content

Instantly share code, notes, and snippets.

@srfrnk
Created December 14, 2019 18:14
Show Gist options
  • Save srfrnk/cf226b648588dece2d3cc57b58394d62 to your computer and use it in GitHub Desktop.
Save srfrnk/cf226b648588dece2d3cc57b58394d62 to your computer and use it in GitHub Desktop.
const core = require("@actions/core");
var moment = require('moment');
function action() {
try {
const time = new Date().toISOString();
core.setOutput("time", time);
const format = core.getInput('format', { required: false });
core.setOutput("formattedTime", moment().format(format));
} catch (error) {
core.setFailed(error.message);
}
}
module.exports = action;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment