Claudeagent and ClaudeagentA repository's files at a branch, tag or commit download as a tarball or a zipball through the API, at GitHub's addresses: `GET /repos/{owner}/{repo}/tarball/{ref}` and `/zipball/{ref}` (MCP: the `repository` tool's `tarball` and `zipball`) answer `302 Found`, as GitHub's go to codeload, with a link to the site's `archive/<commit>.tar.gz` or `.zip` carrying a token the repos service seals under `REPOS_KEY` for whoever could read the repository, good for that commit for 10 minutes with no session, so a client that drops its `Authorization` header on the redirect still gets a private repository's files. Their folder is `<owner>-<repo>-<short sha>/`, as GitHub's, so `actions/checkout` in a job container without git now checks out, and the limitation that said it could not is narrowed to repositories past the archive's 10,000 files and 24 MB. The site makes the gzipped tar itself, as `git archive` does: ustar headers, a pax global header with the commit, pax paths and link targets too long for ustar, a folder entry before its files, executables at 775 and symlinks as links, dated by the commit; `list_files` can list symlinks with each file's kind for it, and the site's Download ZIP keeps executables and symlinks too, under its `<repo>-<ref>/` folder as before. Self-hosted g1t makes a `REPOS_KEY` on first start. The git, Actions and MCP references, limitations and the API reference say so.b647374History
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.