Skip to content

Commit

Permalink
Add github_token as inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
cYKatherine committed Nov 11, 2024
1 parent 515cd33 commit 0ee91bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion actions/commit_pr_and_merge/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' || '' }}
Expand Down

0 comments on commit 0ee91bf

Please sign in to comment.