Skip to content

Commit b5de8f7

Browse files
committed
fix(actions/local-workflow-actions): support token for private repositories
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent 668bc7a commit b5de8f7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

actions/local-workflow-actions/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ inputs:
1717
The same relative path will be available under `../self-workflow` relative to `github.workspace` (for example `../self-workflow/.github/actions`).
1818
required: false
1919
default: ".github/actions"
20+
github-token:
21+
description: |
22+
A GitHub token with permissions to checkout the reusable workflow repository.
23+
This is required when the repository is private. For public repositories, this can be left empty and the checkout will be attempted anonymously.
24+
required: false
25+
default: ${{ github.token }}
2026

2127
outputs:
2228
repository:
@@ -40,6 +46,7 @@ runs:
4046
ref: ${{ job.workflow_sha }}
4147
sparse-checkout: |
4248
${{ inputs.actions-path }}
49+
token: ${{ inputs.github-token || github.token }}
4350

4451
- id: prepare
4552
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0

0 commit comments

Comments
 (0)