Skip to content

Commit 56a52bf

Browse files
committed
action: Add support for checkout-token
The expectation is that this be a Fine-grained token PAT with just Contents: (Read-only|Read and write) as applicable
1 parent 8d9645d commit 56a52bf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

action.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ inputs:
302302
sarif-token:
303303
description: "Token for use with github/codeql-action/upload-sarif"
304304
required: false
305+
checkout-token:
306+
description: "Token for use with actions/checkout (the default is to use the github.token)"
307+
required: false
305308

306309
outputs:
307310
unknown_words:
@@ -398,7 +401,7 @@ runs:
398401
path: ${{ inputs.experimental_path }}
399402
ssh-key: ${{ inputs.ssh_key }}
400403
fetch-depth: ${{ !contains(inputs.check_commit_messages, 'commits') && '1' || '0' }}
401-
token: ${{ inputs.GITHUB_TOKEN }}
404+
token: ${{ inputs.checkout-token || inputs.GITHUB_TOKEN }}
402405
ref: |
403406
${{
404407
github.event_name == 'issue_comment' &&
@@ -414,7 +417,7 @@ runs:
414417
path: ${{ inputs.experimental_path }}
415418
ssh-key: ${{ inputs.ssh_key }}
416419
fetch-depth: ${{ !contains(inputs.check_commit_messages, 'commits') && '1' || '0' }}
417-
token: ${{ inputs.GITHUB_TOKEN }}
420+
token: ${{ inputs.checkout-token || inputs.GITHUB_TOKEN }}
418421
ref: |
419422
${{
420423
github.event_name == 'issue_comment' &&

0 commit comments

Comments
 (0)