Getting input from workflow

This commit is contained in:
Naveenraj M
2020-03-29 00:19:17 +05:30
committed by GitHub
parent 388fa70003
commit 73431f3174

View File

@ -3,12 +3,13 @@ const github = require('@actions/github');
async function run() { async function run() {
try { try {
const myInput = core.getInput('myInput'); const myInput = core.getInput('specFile');
core.debug(`Hello ${myInput} from inside a container`); core.debug(`Hello ${myInput} from inside a container`);
// Get github context data // Get github context data
const context = github.context; const context = github.context;
console.log(`We can even get context data, like the repo: ${context.repo.repo}`) console.log(`We can even get context data, like the repo: ${context.repo.repo}`);
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);
} }