Repository navigation
Conversation
… repository `--into <dir>` creates the Actor in `<dir>/<name>`, making missing folders. It's rejected with a Git `--source`, which creates a new repository. `create` no longer runs `git init` when the Actor's parent folder is inside a Git work tree, so it doesn't nest a repository in a monorepo. A template whose Dockerfile declares `ARG ACTOR_PATH_IN_DOCKER_CONTEXT` builds from the repository root, so `create` sets `dockerContextDir` in `.actor/actor.json` to the Git root, or to the current directory with `--into` outside Git.
commit: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apify create <name> --into <dir>creates the Actor in<dir>/<name>and creates missing folders. It fails before any write when combined with a Git--source, which creates a new repository. With--into, an interactive run uses theapifysource without asking.git init, with or without--into, and says which repository the Actor is in. It used to check only<cwd>/.git, so an Actor created in a subfolder got a nested repository.ARG ACTOR_PATH_IN_DOCKER_CONTEXT, create writesdockerContextDirpointing at the repository root: the Git root, or the current folder with--intooutside Git. Such a Dockerfile builds from the repository root, like the plannedts-monorepotemplate (Add a TypeScript Actor template for monorepos actor-templates#1056). Other templates get nodockerContextDir, because without it the platform builds from the Actor folder.dockerContextDir, it skipsgit initin the Actor folder and says to initialize the repository at the root instead. A repository in the Actor folder wouldn't hold the folderdockerContextDirpoints to, andapify pushwould refuse it.cdline shows the path from the current folder.Tests
test/local/commands/create-into.test.ts, 11 cases with no network. Each fails without this change.create.test.tssetsGIT_CEILING_DIRECTORIES: its temp folders sit inside this checkout, so they'd now count as being inside a repository. The existing-repository test uses a realgit initinstead of an empty.gitfolder, which Git ignores.lint,format,build, andtest:localpass, apart from the two Python fixture tests that fail only on the local machine.Closes #1425
🤖 Generated with Claude Code