Skip to content

Commit fd26d46

Browse files
authored
Add github_token as inputs (#135)
1 parent 515cd33 commit fd26d46

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

actions/commit_pr_and_merge/action.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ inputs:
2222
type: boolean
2323
required: false
2424
default: false
25+
github_token:
26+
description: The github token used to merge PR
27+
type: string
28+
required: false
29+
default: ''
2530
outputs:
2631
git_tag_or_hash:
2732
description: The git tag (or hash if no tag provided) of the merge commit
@@ -75,7 +80,7 @@ runs:
7580
if: steps.changes.outputs.changes_exist == 'true'
7681
shell: bash
7782
env:
78-
GITHUB_TOKEN: ${{ github.token }}
83+
GITHUB_TOKEN: ${{ inputs.github_token == '' && github.token || inputs.github_token }}
7984
PR_URL: ${{ steps.create-pr.outputs.pull-request-url }}
8085
MERGE_PR_STRATEGY: ${{ github.ref_protected == 'true' && '--merge' || '--rebase' }}
8186
ADMIN_ACCESS: ${{ inputs.admin_access == 'true' && '--admin' || '' }}

0 commit comments

Comments
 (0)