Skip to content

Latest commit

 

History

History
151 lines (104 loc) · 8.23 KB

File metadata and controls

151 lines (104 loc) · 8.23 KB

Icon GitHub Action: Checkout

Checkout

Marketplace Release License Stars PRs Welcome GitHub Verified Creator

Overview

Action to checkout the repository compatible for PRs, issues and push events. Workaround for actions/checkout#331.

Set permissions to read contents and pull-requests. This is required to get the PR branch.

on: issue_comment
permissions:
  contents: read
  pull-requests: read

Usage

- uses: hoverkraft-tech/ci-github-common/actions/checkout@2334d395217f9811699dbd4ace9d8559e4d99e0d # 0.37.3
  with:
    # Number of commits to fetch. 0 indicates all history for all branches and tags.
    # See https://github.com/actions/checkout#usage
    #
    # Default: `1`
    fetch-depth: "1"

    # Whether to download Git-LFS files.
    # See https://github.com/actions/checkout#usage
    #
    # Default: `false`
    lfs: "false"

    # Whether to enable sparse checkout and the list of files or directories to include in the checkout.
    # See https://github.com/actions/checkout#usage
    sparse-checkout: ""

    # The branch, tag or SHA to checkout. For pull requests, the ref is set to the merge ref of the PR.
    # See https://github.com/actions/checkout#usage
    ref: ""

    # Whether to persist the token credentials in the Git config.
    # Default to false for security reasons.
    # See https://github.com/orgs/community/discussions/179107.
    #
    # Default: `false`
    persist-credentials: "false"

    # Token to use for checking out the repository instead of the default GITHUB_TOKEN.
    token: ""

Inputs

Input Description Required Default
fetch-depth Number of commits to fetch. 0 indicates all history for all branches and tags. false 1
See https://github.com/actions/checkout#usage
lfs Whether to download Git-LFS files. false false
See https://github.com/actions/checkout#usage
sparse-checkout Whether to enable sparse checkout and the list of files or directories to include in the checkout. false -
See https://github.com/actions/checkout#usage
ref The branch, tag or SHA to checkout. For pull requests, the ref is set to the merge ref of the PR. false -
See https://github.com/actions/checkout#usage
persist-credentials Whether to persist the token credentials in the Git config. false false
Default to false for security reasons.
See https://github.com/orgs/community/discussions/179107.
token Token to use for checking out the repository instead of the default GITHUB_TOKEN. false -

Contributing

Contributions are welcome! Please see the contributing guidelines for more details.

License

This project is licensed under the MIT License.

SPDX-License-Identifier: MIT

Copyright © 2026 hoverkraft

For more details, see the license.


This documentation was automatically generated by CI Dokumentor.