From cfa32ffda1546682370254290545df708263ba75 Mon Sep 17 00:00:00 2001 From: xstefank Date: Tue, 21 Jan 2025 12:30:02 +0100 Subject: [PATCH] Add full JSON as another output In case the user wants to include some additional information in the metadata file. --- .gitignore | 5 +++++ index.js | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index fe194c2..16877f8 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,8 @@ typings/ # DynamoDB Local files .dynamodb/ + +# idea +.idea +*.yml + diff --git a/index.js b/index.js index f30fe08..9d4e568 100644 --- a/index.js +++ b/index.js @@ -14,6 +14,7 @@ try { console.debug(`File found ${metadataFilePath}`); let metadata = yaml.load(data); setOutputs(metadata); + core.setOutput('json', metadata); }) .catch(err => { core.setFailed(`Could not read project metadata file: ${err}`); @@ -41,6 +42,7 @@ try { .then(({data}) => { let metadata = yaml.load(data); setOutputs(metadata); + core.setOutput('json', metadata); }); }).catch((error) => { console.debug(error);