From 0ee91bff62e7034f054bc594a670e5c10546d414 Mon Sep 17 00:00:00 2001 From: Katherine Chen Date: Tue, 12 Nov 2024 10:07:16 +1100 Subject: [PATCH] Add github_token as inputs --- actions/commit_pr_and_merge/action.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/actions/commit_pr_and_merge/action.yaml b/actions/commit_pr_and_merge/action.yaml index c365b72e..deb4d06e 100644 --- a/actions/commit_pr_and_merge/action.yaml +++ b/actions/commit_pr_and_merge/action.yaml @@ -22,6 +22,11 @@ inputs: type: boolean required: false default: false + github_token: + description: The github token used to merge PR + type: string + required: false + default: '' outputs: git_tag_or_hash: description: The git tag (or hash if no tag provided) of the merge commit @@ -75,7 +80,7 @@ runs: if: steps.changes.outputs.changes_exist == 'true' shell: bash env: - GITHUB_TOKEN: ${{ github.token }} + GITHUB_TOKEN: ${{ inputs.github_token == '' && github.token || inputs.github_token }} PR_URL: ${{ steps.create-pr.outputs.pull-request-url }} MERGE_PR_STRATEGY: ${{ github.ref_protected == 'true' && '--merge' || '--rebase' }} ADMIN_ACCESS: ${{ inputs.admin_access == 'true' && '--admin' || '' }}