Add persist-credentials for checkout action with default false

This commit is contained in:
Slawomir Jaranowski
2022-05-10 09:29:43 +02:00
parent 81f0483288
commit f0414a8351
2 changed files with 12 additions and 5 deletions

View File

@ -29,11 +29,11 @@ or use automatic tools like [Dependabot](https://docs.github.com/en/code-securit
## checkout ## checkout
| params | destination | | params | destination | default |
|----------------------|-------------| |------------------------------|---------------------|---------|
| checkout-fetch-depth | fetch-depth | | checkout-fetch-depth | fetch-depth | |
| checkout-path | path | | checkout-path | path | |
| checkout-persist-credentials | persist-credentials | false |
## setup-java ## setup-java

View File

@ -16,6 +16,12 @@ inputs:
description: 'Relative path under $GITHUB_WORKSPACE to place the repository' description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
required: false required: false
checkout-persist-credentials:
description: 'Whether to configure the token or SSH key with the local git config'
default: 'false'
required: false
# java jdk params # java jdk params
java-version: java-version:
@ -73,6 +79,7 @@ runs:
with: with:
fetch-depth: '${{ inputs.checkout-fetch-depth }}' fetch-depth: '${{ inputs.checkout-fetch-depth }}'
path: '${{ inputs.checkout-path }}' path: '${{ inputs.checkout-path }}'
persist-credentials: '${{ inputs.checkout-persist-credentials }}'
- uses: actions/setup-java@v3 - uses: actions/setup-java@v3
with: with: