Created
December 14, 2019 18:14
-
-
Save srfrnk/cf226b648588dece2d3cc57b58394d62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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