Skip to content

Commit

Permalink
add yaml parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
kengo-k committed Jun 1, 2024
1 parent afb4c65 commit eac7893
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const core = require('@actions/core');
const github = require('@actions/github');
const yaml = require('js-yaml');

function main() {
console.log('Hello World');
const args = core.getInput('args');
console.log(args);
const argsObj = yaml.safeLoad(args);
console.log(argsObj);
}

try {
Expand Down
19 changes: 18 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0"
"@actions/github": "^6.0.0",
"js-yaml": "^4.1.0"
}
}

0 comments on commit eac7893

Please sign in to comment.