diff --git a/action.yml b/action.yml index ad4a5480..96c352e5 100644 --- a/action.yml +++ b/action.yml @@ -15,6 +15,11 @@ inputs: description: GitHub Token used to commit metrics default: "" + # Branch to commit + committer_branch: + description: The branch used to commit metrics + default: "" + # GitHub username # Optional, as it defaults "token"'s owner user: @@ -551,4 +556,4 @@ runs: METRICS_ACTION: ${{ github.action }} METRICS_ACTION_PATH: ${{ github.action_path }} METRICS_USE_PREBUILT_IMAGE: ${{ inputs.use_prebuilt_image }} - INPUTS: ${{ toJson(inputs) }} \ No newline at end of file + INPUTS: ${{ toJson(inputs) }} diff --git a/source/app/action/index.mjs b/source/app/action/index.mjs index fceb7f3f..bf996e28 100644 --- a/source/app/action/index.mjs +++ b/source/app/action/index.mjs @@ -257,7 +257,7 @@ info("Dry-run", "complete") else { //Repository and branch - const branch = github.context.ref.replace(/^refs[/]heads[/]/, "") + const branch = input.string("committer_branch", {default:github.context.ref.replace(/^refs[/]heads[/]/, "")}) info("Current repository", `${github.context.repo.owner}/${github.context.repo.repo}`) info("Current branch", branch) //Committer token