From d56581ce1a5e6274a469ef9b7ddcb49424d19844 Mon Sep 17 00:00:00 2001 From: Shakar <5h4k4r.b4kr@gmail.com> Date: Tue, 19 Sep 2023 11:13:05 +0300 Subject: [PATCH] Fix Error: The "path" argument must be of type string or an instance of Buffer or URL. Received an instance of Object Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com> --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 4c95ee9..f4fc096 100644 --- a/index.js +++ b/index.js @@ -48,9 +48,9 @@ async function run() { console.log(`Old version: ${version}. New version: ${newVersion}`) - fs.writeFileSync(file, JSON.stringify(filePath, null, 2)); + fs.writeFileSync(file, JSON.stringify(file, null, 2)); - await commitChanges(core.getInput('filePath'), file); + await commitChanges(core.getInput('filePath'), JSON.stringify(file, null, 2)); const payload = JSON.stringify(github.context.payload, undefined, 2)