[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f1q63vl0cdyx3n":3},{"code":4,"message":5,"data":6,"timestamp":55},10000,"success",{"full_name":7,"position":8,"description":9,"language":10,"stars":11,"forks":12,"stars_gained":13,"age_days":14,"hn_threads":15,"one_liner":40,"summary_md":41,"topic":42,"github_topics":45,"license":46,"homepage":47,"updated_at":48,"history":49},"actions\u002Fcheckout",21,"Action for checking out a repo","TypeScript",8968,2734,4,2654,[16,22,26,31,35],{"id":17,"title":18,"points":19,"comments":20,"posted_at":21},37380354,"Can't use 'tar -xzf' extract archive file",3,0,"2023-09-04",{"id":23,"title":24,"points":19,"comments":20,"posted_at":25},25229739,"GitHub Actions Stopped Working","2020-11-27",{"id":27,"title":28,"points":29,"comments":20,"posted_at":30},40933257,"Checkout v3 using node20 instead of node16",2,"2024-07-11",{"id":32,"title":33,"points":29,"comments":20,"posted_at":34},31017033,"Git v2.35.2 breaks actions\u002Fcheckout in containers","2022-04-13",{"id":36,"title":37,"points":38,"comments":20,"posted_at":39},44209775,"GitHub's checkout action is halting contributions",1,"2025-06-07","The standard GitHub Actions step that puts a repository's code on the runner before the rest of a workflow runs.","Treat `actions\u002Fcheckout` as infrastructure you pin and occasionally re-read, not a tool you evaluate and adopt. Upgrading across major versions is worth a deliberate look, because v5-v7 changed runtime requirements and the default behavior around fork pull requests.\n\n## The problem\n\nA workflow needs the repository's files in `$GITHUB_WORKSPACE` before it can build, test or lint, but the runner starts empty. Adding this action changes that: the code appears on the runner, with a single triggering commit by default, and later steps can run `git` and their build commands against it. Without it, every workflow would need its own clone step and its own handling of tokens, refs and cleanup.\n\n## What's different\n\nThe action fetches only the commit that triggered the workflow unless you set `fetch-depth: 0`, which keeps jobs fast but means history-dependent tooling needs that input adjusted. Authentication is handled for you: the token or SSH key is configured so authenticated `git` commands work, then removed during post-job cleanup. Since v6, `persist-credentials` stores credentials in a separate file under `$RUNNER_TEMP` rather than in `.git\u002Fconfig`, and `persist-credentials: false` opts out entirely.\n\nThe most consequential change is v7's default refusal to check out fork pull-request code when a workflow is triggered by `pull_request_target` or `workflow_run`, because those triggers run with the base repository's token, secrets and runner access. Opting back in requires setting `allow-unsafe-pr-checkout: true` after reviewing the linked risks. That flip is a real workflow-behavior change: jobs that relied on checking out fork code under those triggers will fail until adjusted deliberately.\n\n## Who should try it\n\nAnyone writing a GitHub Actions workflow that needs repository contents should use it; it is the conventional first step. Maintainers of workflows using `pull_request_target` or `workflow_run` should treat the v7 upgrade as a review item, since the new default can stop previously working fork-checkout jobs. Teams running Docker container actions that need authenticated git commands should check their runner version, since v6 requires Actions Runner v2.329.0 or later. Anyone wanting to change the action itself is out of luck: the README states the repository is not taking contributions right now.\n\n## Requirements and limitations\n\nVersion compatibility is the main thing to pin down. v5 requires runner v2.327.1 or later for the node24 runtime; v6's separate credential file requires runner v2.329.0 or later for authenticated git inside Docker container actions. Self-hosted runners left on older versions can break after an upgrade.\n\nOperationally, the token persists in the local git config by default so scripts can push, and is removed in post-job cleanup; set `persist-credentials: false` if jobs should not have that access. Workflows needing full history must set `fetch-depth: 0`, which costs time on large repositories. The change history is on the [release page](https:\u002F\u002Fgithub.com\u002Factions\u002Fcheckout\u002Freleases\u002Flatest), and the fork-checkout trade-off is explained in [GitHub's guidance](https:\u002F\u002Fgh.io\u002Fsecurely-using-pull_request_target).\n\n## HotRepo's take\n\nHotRepo recorded this repository at 8,966 stars on 2026-10-24 and 8,967 on 2026-10-25, with +4 stars on each of those two days; the sample is too short to say anything about momentum. The useful check before upgrading is whether your workflows use `pull_request_target` or `workflow_run` to check out fork code, and whether your runners meet the v5\u002Fv6 minimums.",{"slug":43,"name":44},"devops","DevOps & Self-hosting",[],"MIT","https:\u002F\u002Fgithub.com\u002Ffeatures\u002Factions","2026-10-25T03:21:27Z",[50,53],{"date":51,"stars":52,"stars_gained":13},"2026-10-24",8966,{"date":54,"stars":11,"stars_gained":13},"2026-10-25",1792906173]