Skip to content

Commit

Permalink
#58 New feature to support repository and token options (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanlafond authored Sep 22, 2023
1 parent c1ef1c9 commit 41e894b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ For default values you only need:
## checkout
| params | destination | default |
|------------------------------|---------------------|---------|
| checkout-fetch-depth | fetch-depth | |
| checkout-path | path | |
| checkout-ref | ref | |
| checkout-persist-credentials | persist-credentials | false |
| params | destination | default |
|------------------------------|---------------------|--------------------------|
| checkout-fetch-depth | fetch-depth | |
| checkout-path | path | |
| checkout-ref | ref | |
| checkout-repository | repository | ${{ github.repository }} |
| checkout-token | token | ${{ github.token }} |
| checkout-persist-credentials | persist-credentials | false |
## setup-java
Expand Down
12 changes: 12 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ inputs:
description: 'The branch, tag, or SHA of the repository to clone'
required: false

checkout-repository:
description: 'The repository to checkout if not the repository that triggered the action. For use when building GitHub Apps'
required: false
default: ${{ github.repository }}

checkout-token:
description: 'Token to use for checkout if checking out a repository out of scope for GITHUB_TOKEN'
required: false
default: ${{ github.token }}

# java jdk params

java-version:
Expand Down Expand Up @@ -85,6 +95,8 @@ runs:
path: '${{ inputs.checkout-path }}'
persist-credentials: '${{ inputs.checkout-persist-credentials }}'
ref: '${{ inputs.checkout-ref }}'
repository: '${{ inputs.checkout-repository }}'
token: '${{ inputs.checkout-token }}'

- uses: actions/setup-java@v3
with:
Expand Down

0 comments on commit 41e894b

Please sign in to comment.