diff --git a/README.md b/README.md index a47dab9f8..8beacf51d 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,10 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/ # Otherwise, uses the default branch. ref: '' - # Whether to checkout the default repository branch if specified ref does not - # exist. If this is set to true, then fetch-depth should be 0 - # Default: true - default-ref-on-error: '' + # Indicates whether to checkout the default repository branch if the requested ref + # does not exist + # Default: false + default-branch-checkout: '' # Personal access token (PAT) used to fetch the repository. The PAT is configured # with the local git config, which enables your scripts to run authenticated git diff --git a/action.yml b/action.yml index ad48198f2..93f2bc62a 100644 --- a/action.yml +++ b/action.yml @@ -9,11 +9,9 @@ inputs: The branch, tag or SHA to checkout. When checking out the repository that triggered a workflow, this defaults to the reference or SHA for that event. Otherwise, uses the default branch. - default-ref-on-error: - description: > - Whether to checkout the default repository branch if specified ref does not exist. - If this is set to true, then fetch-depth should be 0 - default: true + default-branch-checkout: + description: 'Indicates whether to checkout the default repository branch if the requested ref does not exist' + default: false token: description: > Personal access token (PAT) used to fetch the repository. The PAT is configured diff --git a/dist/index.js b/dist/index.js index 774dc6ff4..77146ceb8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1741,7 +1741,8 @@ function getInputs() { core.debug(`commit = '${result.commit}'`); // Default branch checkout result.defaultBranchCheckout = - (core.getInput('default-branch-checkout') || 'true').toUpperCase() === 'TRUE'; + (core.getInput('default-branch-checkout') || 'true').toUpperCase() === + 'TRUE'; core.debug(`default-branch-checkout = '${result.defaultBranchCheckout}'`); // Clean result.clean = (core.getInput('clean') || 'true').toUpperCase() === 'TRUE';