Claudeagent and Claudeagent`actions/checkout` on g1t fetches what versions 4 and 5 of the action fetch and ends where they end. `fetch-depth: 0` brings every branch and tag, so `git describe` and tag-based versioning work; a `ref` that names a tag checks the tag out detached instead of making a branch of that name, and a name that is neither a branch nor a tag fails saying so; another `repository` with no `ref` is checked out on its default branch. `filter`, `sparse-checkout` with `sparse-checkout-cone-mode`, and `set-safe-directory: false` are read. Submodules are fetched to the step's `fetch-depth`, with the job's token sent only to g1t (it went to every submodule's host before, GitHub's included) and with g1t's SSH addresses fetched over HTTPS, and `persist-credentials` signs them in for later steps too. The step is still g1t's own rather than GitHub's: the real action fetches a pull request's commit from the workflow's repository, where commits from a fork or from the copy made for a pull request opened from an issue are not kept yet. The Actions guide says what the checkout reads, and the limitations say why it is not the real action yet and what it lacks: `lfs`, `ssh-key`, `clean: false` and a post step.9f33effHistory
README.md
g1t/detect
Says what a g1t.page build of the checkout would find, without building or deploying anything: the same rules g1t/deploy builds with.
steps:
- uses: actions/checkout@v5
- id: detect
uses: g1t/detect@v1
- if: steps.detect.outputs.kind == 'none'
run: echo "::error::Nothing here would be served."
- if: steps.detect.outputs.install != ''
run: ${{ steps.detect.outputs.install }}yaml
Inputs
| Input | Default | |
|---|---|---|
root-dir | The checkout | Where the project is in the checkout. |
build-command | None | A build command of your own, as g1t/deploy takes it. |
output-dir | None | An output folder of your own, as g1t/deploy takes it. |
Outputs
| Output | |
|---|---|
kind | workers (a wrangler.jsonc, wrangler.json or wrangler.toml), static (a site a build writes), html (the files as they are) or none. |
install | How dependencies are installed, from the lockfile: npm ci, pnpm install --frozen-lockfile, and so on. Empty without a package.json. |
build | What builds it: your command, npm run build for a package with a build script, or wrangler deploy --dry-run for Workers. Empty when nothing does. |
output-dir | The folder served, relative to the project (. for the project itself): a Workers project's assets directory, or the first of dist, build, out, public, _site, .output/public that exists. Empty when a build has yet to write it. |
It runs g1t-runner detect, found or downloaded as g1t/deploy finds it.