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 GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 2, 2026
License
None

Pinned Snippet

workflow.ymlSHA-pinned
uses: metamask/action-checkout-and-setup@0543b5929698c71e3ccc6ed24eac87825669b5de # v3.5.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
is-high-risk-environmentUse a secure setup without caching (true = secure, false = optimized for speed).yes
fetch-depthDepth of the Git history to fetch.no1
filterPartially clone the repository with the given Git filter. This is passed to actions/checkout; for example, tree:0 performs a treeless partial clone.no""
refBranch, tag, or SHA to checkout.no""
cache-node-modulesEnable node_modules caching for the prepare job. When is-high-risk-environment is true, only saves (write-only); when false, reads and writes.nofalse
node-versionNode.js version to use. If not provided, will use the version specified in the `.nvmrc` file.no""
skip-allow-scriptsSkip the `yarn allow-scripts` step. If your job does not need this step, skipping it may save some time.nofalse
yarn-install-max-retriesMaximum number of retries for the `yarn --immutable` install command.no5
yarn-tarballURL to a Yarn tarball to use instead of the default.no.yarn/yarn-corepack.tgz
force-setupForce 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.nofalse
persist-credentialsWhether 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).notrue
skip-installSkip all Yarn install steps. The repository is still checked out and Node.js is still set up, but dependencies are not installed.nofalse
namedescription
node-modules-cache-hitWhether the node_modules cache was hit.
yarn-cache-hitWhether the yarn cache was hit.
computed-node-versionThe truncated version of Node.js that was computed.
node-versionThe full version of Node.js that was actually used.
skipped-setupWhether the setup steps were skipped due to a cache hit.