File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 44
55inputs :
66 github-token :
7- description : GitHub token for creating PRs and performing operations
8- required : true
7+ description : GitHub token for creating PRs and performing operations (required if app credentials not provided)
98
109 app-id :
1110 description : GitHub App ID for bot authentication
12- required : false
1311
1412 app-private-key :
1513 description : GitHub App private key for bot authentication
16- required : false
1714
1815 reviewers :
1916 description : Reviewers to assign to the PR (e.g., '@org/team' or 'user1,user2')
20- required : false
2117 default : " "
2218
2319 prefix :
2420 description : Prefix for commit messages and PR titles
25- required : false
2621 default : " chore: "
2722
2823 merge-method :
2924 description : Method to use for merging (squash, merge, rebase)
30- required : false
3125 default : squash
3226
3327 check-timeout-minutes :
3428 description : Maximum time to wait for status checks (in minutes)
35- required : false
3629 default : " 10"
3730
3831 check-interval-seconds :
3932 description : Interval between status check polls (in seconds)
40- required : false
4133 default : " 30"
4234
4335outputs :
5951 - name : Validate inputs
6052 shell : bash
6153 run : |
62- if [[ -z "${{ inputs.github-token }}" ]]; then
63- echo "::error::github-token is required"
54+ # Ensure either github-token OR app credentials are provided
55+ if [[ -z "${{ inputs.github-token }}" && ( -z "${{ inputs.app-id }}" || -z "${{ inputs.app-private-key }}" ) ]]; then
56+ echo "::error::Either github-token must be provided, or both app-id and app-private-key must be provided"
6457 exit 1
6558 fi
6659
10093 id : auto-merge
10194 shell : bash
10295 env :
103- GH_TOKEN : ${{ inputs .github-token }}
96+ GH_TOKEN : ${{ steps .github-token.outputs. token }}
10497 PR_NUMBER : ${{ steps.trunk-upgrade.outputs.pull-request-number }}
10598 REPO_URL : https://github.com/${{ github.repository }}
10699 MERGE_METHOD : ${{ inputs.merge-method }}
You can’t perform that action at this time.
0 commit comments