Bump actions/checkout from 3 to 4 (#1697)
- Bump actions/checkout from 3 to 4
Bumps actions/checkout from 3 to 4.
updated-dependencies:
- dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major …
Signed-off-by: dependabot[bot] support@github.com
Apply suggestions from code review
.
Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cory Miller 13227161+cory-miller@users.noreply.github.com
Checkout V4
This action checks-out your repository under
$GITHUB_WORKSPACE, so your workflow can access it.Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set
fetch-depth: 0to fetch all history for all branches and tags. Refer here to learn which commit$GITHUB_SHApoints to for different events.The auth token is persisted in the local git config. This enables your scripts to run authenticated git commands. The token is removed during post-job cleanup. Set
persist-credentials: falseto opt-out.When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files.
What’s new
Please refer to the release page for the latest release notes.
Usage
Scenarios
.githubandsrcfolderFetch only the root files
Fetch only the root files and
.githubandsrcfolderFetch only a single file
Fetch all history for all tags and branches
Checkout a different branch
Checkout HEAD^
Checkout multiple repos (side by side)
Checkout multiple repos (nested)
Checkout multiple repos (private)
Checkout pull request HEAD commit instead of merge commit
Checkout pull request on closed event
Push a commit using the built-in token
License
The scripts and documentation in this project are released under the MIT License