Summary
When using checkout: false in agentic workflow frontmatter, the compiler correctly removes the actions/checkout step from the agent job. However, it still emits "Configure Git credentials" steps that run git remote set-url origin ..., which fails with:
fatal: not a git repository (or any of the parent directories): .git
The agent job fails at this step because there is no .git directory when checkout is disabled.
Steps to Reproduce
- Set
checkout: false in the workflow frontmatter:
checkout: false
permissions:
issues: read
- Run
gh aw compile (v0.59.0) — compiles successfully
- Trigger the workflow
Expected Behavior
When checkout: false is set, the compiled workflow should skip (or gate) git credential configuration steps that depend on a .git directory existing, specifically:
- "Configure Git credentials" (which runs
git remote set-url origin ...)
- "Clean git credentials"
Actual Behavior
The compiled workflow still includes these steps unconditionally:
- name: Configure Git credentials
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git config --global am.keepcr true
git remote set-url origin "https://x-access-token:...@github.com/REPO.git"
The git config --global commands succeed, but git remote set-url origin fails because no repository was cloned.
Failing Run
https://github.com/github/fcto-workflow-test/actions/runs/23172602972/job/67327762478
Workaround
Using sparse-checkout to minimize what is fetched instead of disabling checkout entirely:
checkout:
sparse-checkout: "README.md"
permissions:
contents: read
issues: read
Environment
gh aw version: v0.59.0
- Workflow type: API-only (uses MCP tools for GitHub Projects/Issues, no repo files needed)
Summary
When using
checkout: falsein agentic workflow frontmatter, the compiler correctly removes theactions/checkoutstep from the agent job. However, it still emits "Configure Git credentials" steps that rungit remote set-url origin ..., which fails with:The agent job fails at this step because there is no
.gitdirectory when checkout is disabled.Steps to Reproduce
checkout: falsein the workflow frontmatter:gh aw compile(v0.59.0) — compiles successfullyExpected Behavior
When
checkout: falseis set, the compiled workflow should skip (or gate) git credential configuration steps that depend on a.gitdirectory existing, specifically:git remote set-url origin ...)Actual Behavior
The compiled workflow still includes these steps unconditionally:
The
git config --globalcommands succeed, butgit remote set-url originfails because no repository was cloned.Failing Run
https://github.com/github/fcto-workflow-test/actions/runs/23172602972/job/67327762478
Workaround
Using
sparse-checkoutto minimize what is fetched instead of disabling checkout entirely:Environment
gh awversion: v0.59.0