Update action
This commit is contained in:
@@ -56,7 +56,7 @@ inputs:
|
||||
# This can used to add padding if generated image is cropped or on the contrary, remove empty space
|
||||
config_padding:
|
||||
description: Configure bottom padding
|
||||
default: 2%
|
||||
default: 5%
|
||||
|
||||
# Number of repositories to use for metrics
|
||||
# A high number increase metrics accuracy, but will consume additional API requests when using plugins
|
||||
|
||||
@@ -9,7 +9,11 @@
|
||||
;((async function () {
|
||||
//Input parser
|
||||
const input = {
|
||||
get:(name) => decodeURIComponent(`${core.getInput(name)}`.trim()),
|
||||
get:(name) => {
|
||||
const value = `${core.getInput(name)}`.trim()
|
||||
try { return decodeURIComponent(value) }
|
||||
catch { return value}
|
||||
},
|
||||
bool:(name, {default:defaulted = undefined} = {}) => /^(?:[Tt]rue|[Oo]n|[Yy]es)$/.test(input.get(name)) ? true : /^(?:[Ff]alse|[Oo]ff|[Nn]o)$/.test(input.get(name)) ? false : defaulted,
|
||||
number:(name, {default:defaulted = undefined} = {}) => Number.isFinite(Number(input.get(name))) ? Number(input.get(name)) : defaulted,
|
||||
string:(name, {default:defaulted = undefined} = {}) => input.get(name) || defaulted,
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
}
|
||||
|
||||
/** Render svg */
|
||||
async function svgresize(svg, {padding = "2%", convert} = {}) {
|
||||
async function svgresize(svg, {padding = "5%", convert} = {}) {
|
||||
//Instantiate browser if needed
|
||||
if (!svgresize.browser) {
|
||||
svgresize.browser = await puppeteer.launch({headless:true, executablePath:process.env.PUPPETEER_BROWSER_PATH, args:["--no-sandbox", "--disable-extensions", "--disable-setuid-sandbox", "--disable-dev-shm-usage"]})
|
||||
|
||||
Reference in New Issue
Block a user