diff --git a/action.yml b/action.yml index fd4ca92c..c30ca5fc 100644 --- a/action.yml +++ b/action.yml @@ -174,6 +174,12 @@ inputs: description: Enable debug logs default: no + # Enable dry-run mode + # Generate image but does not push it (used for testing) + dryrun: + description: Enable dry-run + default: no + # When enabled, any plugins errors will throw # By default, it will still generates metrics but renders an error message plugins_errors_fatal: diff --git a/action/dist/index.js b/action/dist/index.js index 66e8373f..f3b32049 100644 --- a/action/dist/index.js +++ b/action/dist/index.js @@ -911,7 +911,10 @@ var E_Users_lecoq_Documents_GitHub_gitstats_node_modules_actions_github_lib_gith console.log(`Render | complete`) //Commit to repository - { + const dryrun = core.getInput("dryrun") || false + if (dryrun) + console.log(`Dry-run | complete`) + else { //Committer token const token = core.getInput("committer_token") || core.getInput("token") console.log(`Committer token | ${token ? "provided" : "missing"}`) diff --git a/action/index.mjs b/action/index.mjs index 9299fdba..eea74ecf 100644 --- a/action/index.mjs +++ b/action/index.mjs @@ -117,7 +117,10 @@ console.log(`Render | complete`) //Commit to repository - { + const dryrun = core.getInput("dryrun") || false + if (dryrun) + console.log(`Dry-run | complete`) + else { //Committer token const token = core.getInput("committer_token") || core.getInput("token") console.log(`Committer token | ${token ? "provided" : "missing"}`)