diff --git a/package.json b/package.json index 15961d8..880decc 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "access": "public" }, "dependencies": { - "@actions/core": "^1.3.0", + "@actions/core": "^1.10.0", "gradient-badge": "^1.3.1" }, "devDependencies": { diff --git a/src/index.js b/src/index.js index 4550b83..6c029c5 100644 --- a/src/index.js +++ b/src/index.js @@ -19,14 +19,14 @@ const createBadgeFromInputs = ({ {} ) - console.log('Received inputs:', inputs) + core.debug('Received inputs:', inputs) // Fix some inputs for (const [key, fn] of Object.entries(inputFixes)) { inputs[key] = fn(inputs) } - console.log('Generate badge using the given inputs and defaults:', inputs) + core.info('Generate badge using the given inputs and defaults:', inputs) // Generate the badge const { path, ...gradientBadgeOptions } = inputs @@ -34,21 +34,21 @@ const createBadgeFromInputs = ({ // Output badge contents to Action output if (outputName?.length) { - console.log("Write data to action's output 'badge'...") + core.info("Write data to action's output 'badge'...") core.setOutput(outputName, svgString) } // If path is defined, save SVG data to that file if (path?.length) { - console.log(`Write data to file ${path}...`) + core.info(`Write data to file ${path}...`) // In case an error occurred writing file, // exception is thrown and success messsage is not printed fs.writeFileSync(path, svgString) - console.log('Data saved succesfully.') + core.info('Data saved succesfully.') } } catch (error) { - console.error(error) + core.error(error) core.setFailed(error.message) } } diff --git a/yarn.lock b/yarn.lock index 26fd3e6..9f9a6f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@actions/core@^1.3.0": +"@actions/core@^1.10.0": version "1.10.0" resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f" integrity sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==