metamask/Checkout and setup environment
Git checkout if not already checked out, get node_modules from cache if available, set up Node.js, run yarn install
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 2, 2026
- License
- None
Pinned Snippet
uses: metamask/action-checkout-and-setup@0543b5929698c71e3ccc6ed24eac87825669b5de # v3.5.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| is-high-risk-environment | Use a secure setup without caching (true = secure, false = optimized for speed). | yes | — |
| fetch-depth | Depth of the Git history to fetch. | no | 1 |
| filter | Partially clone the repository with the given Git filter. This is passed to actions/checkout; for example, tree:0 performs a treeless partial clone. | no | "" |
| ref | Branch, tag, or SHA to checkout. | no | "" |
| cache-node-modules | Enable node_modules caching for the prepare job. When is-high-risk-environment is true, only saves (write-only); when false, reads and writes. | no | false |
| node-version | Node.js version to use. If not provided, will use the version specified in the `.nvmrc` file. | no | "" |
| skip-allow-scripts | Skip the `yarn allow-scripts` step. If your job does not need this step, skipping it may save some time. | no | false |
| yarn-install-max-retries | Maximum number of retries for the `yarn --immutable` install command. | no | 5 |
| yarn-tarball | URL to a Yarn tarball to use instead of the default. | no | .yarn/yarn-corepack.tgz |
| force-setup | Force checkout, Node setup, and cache restore to run even if the node_modules cache exists. Use this with cache-node-modules when later steps in the same job need a prepared workspace. | no | false |
| persist-credentials | Whether to persist the GitHub token in the checked-out repository. This is passed to the `actions/checkout` step. Setting this to false can help prevent accidental token leaks, but if your workflow needs to make authenticated GitHub API calls using the checked-out repository, you may need to set this to true (default). | no | true |
| skip-install | Skip all Yarn install steps. The repository is still checked out and Node.js is still set up, but dependencies are not installed. | no | false |
Outputs
| name | description |
|---|---|
| node-modules-cache-hit | Whether the node_modules cache was hit. |
| yarn-cache-hit | Whether the yarn cache was hit. |
| computed-node-version | The truncated version of Node.js that was computed. |
| node-version | The full version of Node.js that was actually used. |
| skipped-setup | Whether the setup steps were skipped due to a cache hit. |