Matched signals
- actions/checkout
- checkout step is missing
- Did you forget to run actions/checkout
- file not found in current directory
- The process.*cannot find the file
GitHub Actions missing actions/checkout before accessing repo files
What this failure means
GitHub Actions job tried to access repository files (build, test, run scripts) but the repository was never checked out. The actions/checkout step is missing or runs after the file access step.
Symptoms
Faultline looks for one or more of these log fragments:
actions/checkout
checkout step is missing
Did you forget to run actions/checkout
file not found in current directory
The process.*cannot find the file
Diagnosis
actions/checkout@v4 (or similar) must run before any steps that read or execute files from the repository. Common mistakes:
- The
actions/checkoutstep is missing entirely. - The
actions/checkoutstep runs after the step that accesses repo files. - The job runs on a self-hosted runner without a clean workspace.
- A previous workflow step deletes the checked-out files.
The error typically appears as file not found, no such file or directory, or commands failing to execute because they cannot find repository files.
Fix steps
-
Ensure
actions/checkoutis the first step (or very early) in the job:jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # Add this as the FIRST step - uses: actions/setup-node@v3 with: node-version: '18' - run: npm install - run: npm test -
If the checkout is present but in the wrong place, move it before any file access steps.
-
If working with a monorepo, ensure you check out the correct path or use
fetch-depthcorrectly:- uses: actions/checkout@v4 with: fetch-depth: 0 # For full history if needed -
Verify the workspace is clean at the start of each job. Self-hosted runners may retain files from previous runs.
Validation
- The workflow file contains
uses: actions/checkout@v4(or newer version) as an early step. ls -lain the next step shows repository files in the runner’s working directory.- Re-run the GitHub Actions workflow.
Why it matters
Every GitHub Actions job starts with an empty workspace. Without actions/checkout, there are no repository files to build, test, or deploy. This is a fundamental setup requirement.
Prevention
- Use a workflow template that includes
actions/checkoutfrom the start. - Add a lint check or workflow validation to catch missing checkouts.
- Document the required workflow structure in
CONTRIBUTING.md.
Try it locally
cat .github/workflows/*.yml
grep -n "actions/checkout" .github/workflows/*.yml
How Faultline detects it
Use faultline explain github-actions-missing-checkout to see the full playbook.
faultline analyze build.log
faultline explain github-actions-missing-checkout
Generated from playbooks/bundled/log/ci/github-actions-missing-checkout.yaml. Do not edit directly.