pasqualesalza/Smart Checkout Action
Perform an optimized checkout a repository. In case of checkout-type=branch, it will calculate and fetch the minimum commits for head and base refs to ensure the merge base commit is included. In case of checkout-type=commit, it will checkout the specific commit SHA on the main branch, guaranteeing HEAD is pointing to the commit.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| checkout-type | The type of the checkout. Either "branch" or "commit" | yes | branch |
| base-branch | The base branch name. Required if checkout-type=branch | yes | main |
| head-branch | The head branch name. Required if checkout-type=branch | yes | ${{ github.head_ref || github.ref_name }} |
| commit | The commit SHA to checkout. Required if checkout-type=commit | no | ${{ github.sha }} |
| main-branch | The main branch name. Required if checkout-type=commit | no | main |
| lfs | Whether to use LFS caching | yes | false |
| token | The PAT GitHub token. Required to run authenticated git commands in other steps | no | ${{ github.token }} |
Outputs
no outputs