:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore: vendor depot github-runners and container-builds skills (#59275)
Raúl Negrón-Otero2995af9fd84b
diff --git a/.agents/skills/depot-container-builds/SKILL.md b/.agents/skills/depot-container-builds/SKILL.mdnew file mode 100644index 000000000000..03b89fa41c81--- /dev/null+++ b/.agents/skills/depot-container-builds/SKILL.md@@ -0,0 +1,229 @@+---+name: depot-container-builds+description: >+ Configures and runs Depot remote container builds using `depot build` and `depot bake`.+ Use when building Docker images, creating Dockerfiles with Depot, pushing images to registries,+ building multi-platform/multi-arch images (linux/amd64, linux/arm64), debugging container build+ failures, optimizing Dockerfile layer caching, using docker-bake.hcl or docker-compose builds,+ or migrating from `docker build` / `docker buildx build` to Depot. Also use when the user+ mentions depot build, depot bake, container builds, image builds, or asks about Depot's+ build cache, build parallelism, or ephemeral registry.+---++# Depot Container Builds++Depot runs Docker image builds on remote high-performance builders (16 CPU, 32 GB RAM, NVMe SSD cache). `depot build` is a drop-in replacement for `docker build` / `docker buildx build`. `depot bake` replaces `docker buildx bake`.++## Project Selection for Multi-Org Users++Container build commands target a specific project, not an organization. If expected projects aren't visible or a build unexpectedly prompts to select a project, the current default org may be wrong:++```bash+depot org show # Current org ID+depot org list # Orgs the user belongs to+depot org switch <org-id> # Optional: set default org+```++## Key Concepts++- Builds run remotely on ephemeral EC2 instances — images stay in remote cache by default+- Use `--load` to download to local Docker, `--push` to push to a registry, `--save` to store in Depot's ephemeral registry+- Cache is **fully automatic** on persistent NVMe SSDs — no manual cache config needed+- Multi-platform builds use **native CPU builders** (no QEMU emulation) for amd64 and arm64 simultaneously+- All team members on a project share the same layer cache++## `depot build` — Essential Patterns++```bash+# Build remotely (image stays in remote cache)+depot build -t repo/image:tag .++# Build + download to local Docker daemon+depot build -t repo/image:tag . --load++# Build + push directly to registry (fast — doesn't route through local network)+depot build -t repo/image:tag . --push++# Multi-platform build (native CPUs, no emulation)+depot build --platform linux/amd64,linux/arm64 -t repo/image:tag . --push++# Save to Depot ephemeral registry (default 7-day retention)+depot build --save .+depot build --save --save-tag my-tag .++# Suppress provenance metadata (fixes "unknown/unknown" platform in registries)+depot build -t repo/image:tag --push --provenance=false .++# Lint Dockerfile before building+depot build -t repo/image:tag . --lint++# Build with secrets+depot build --secret id=mysecret,src=./secret.txt -t repo/image:tag .++# Build with SSH forwarding+depot build --ssh default -t repo/image:tag .++# Specify a Depot project explicitly+depot build --project <project-id> -t repo/image:tag .+```++### Key Flags++| Flag | Description |+| ------------------ | ------------------------------------------------------------------- |+| `--load` | Download image to local Docker daemon |+| `--push` | Push to registry |+| `--save` | Save to Depot ephemeral registry |+| `--save-tag` | Custom tag for Depot Registry |+| `--platform` | Target platforms (`linux/amd64`, `linux/arm64`, or both) |+| `--build-platform` | Force build to run on specific arch (`dynamic` default) |+| `--project` | Depot project ID |+| `--token` | Depot API token |+| `--lint` | Lint Dockerfile before build |+| `--provenance` | Control provenance attestation (set `false` to fix unknown/unknown) |+| `--no-cache` | Disable cache for this build |+| `-f` / `--file` | Path to Dockerfile |+| `-t` / `--tag` | Image name and tag |+| `--target` | Build specific stage |+| `--build-arg` | Set build-time variables |+| `--secret` | Expose secrets (`id=name[,src=path]`) |+| `--ssh` | Expose SSH agent |+| `--output` / `-o` | Custom output (`type=local,dest=path`) |++## `depot bake` — Multi-Image Builds++Drop-in replacement for `docker buildx bake`. Builds multiple images in parallel.++```bash+depot bake # Default file lookup+depot bake -f docker-bake.hcl # Specific HCL file+depot bake -f docker-compose.yml --load # Build compose services + load locally+depot bake --save --save-tag myrepo/app:v1 # Save to Depot Registry+depot bake --print # Print resolved config without building+```++**Default file lookup order:** compose.yaml → compose.yml → docker-compose.yml → docker-compose.yaml → docker-bake.json → docker-bake.override.json → docker-bake.hcl → docker-bake.override.hcl++### HCL Bake File Example++```hcl+variable "TAG" {+ default = "latest"+}++group "default" {+ targets = ["app", "worker"]+}++target "app" {+ dockerfile = "Dockerfile"+ platforms = ["linux/amd64", "linux/arm64"]+ tags = ["myrepo/app:${TAG}"]+ args = { NODE_VERSION = "20" }+}++target "worker" {+ dockerfile = "Dockerfile.worker"+ tags = ["myrepo/worker:${TAG}"]+ contexts = { app = "target:app" } # Share base between targets+}+```++Override variables: `TAG=v2.0 depot bake`++### Docker Compose with Per-Service Project IDs++```yaml+services:+ api:+ build:+ dockerfile: ./Dockerfile.api+ x-depot:+ project-id: abc123+ web:+ build:+ dockerfile: ./Dockerfile.web+ x-depot:+ project-id: def456+```++## Docker Compose Integration++```bash+# Preferred: build all services in parallel, then load+depot bake -f docker-compose.yml --load+docker compose up++# Alternative: zero code change (less efficient, each service = separate build)+depot configure-docker+docker compose build+```++## Migration from Docker++```bash+# docker build → depot build (same flags, one-line swap)+depot build -t my-image .++# docker buildx bake → depot bake+depot bake -f docker-bake.hcl++# Zero code change via Docker plugin+depot configure-docker+docker build . # Routes through Depot (look for [depot] prefix in logs)+```++**When migrating, remove these flags** — Depot handles caching automatically:++- `--cache-from type=gha` — causes "services aren't available" errors+- `--cache-to type=gha` — same issue+- Any manual BuildKit cache configuration++## Common Mistakes++| Mistake | Fix |+| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- |+| Using `--cache-from type=gha` or `--cache-to type=gha` | Remove them. Depot caches automatically on NVMe SSDs. |+| Multi-platform image shows `unknown/unknown` platform | Add `--provenance=false` |+| Expecting image locally after `depot build` | Add `--load` to download, or `--push` to push to registry |+| `.git` directory missing in build context | Add `--build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1` |+| Build hangs or "failed to mount" errors | Reset cache in project settings or via `depot cache reset` |+| "401 Unauthorized" pulling base images | Docker Hub rate limit — authenticate with `docker login` or use `public.ecr.aws/docker/library/` mirror |+| "Keep alive ping failed" / OOM | Scale up builder size in project settings or enable autoscaling |++## Builder Sizes++| Size | CPUs | RAM | Per-Minute | Plans |+| ----------- | ---- | ------ | ---------- | -------- |+| Default | 16 | 32 GB | $0.004 | All |+| Large | 32 | 64 GB | $0.008 | Startup+ |+| Extra Large | 64 | 128 GB | $0.016 | Startup+ |++Billed per-second. Bake counts as one build regardless of target count.++## Depot Registry++```bash+# Save image to Depot Registry+depot build --save -t myapp .++# Pull a saved image+depot pull --project <id> <build-id>++# Push saved image to another registry+depot push --project <id> -t registry/image:tag <build-id>++# Docker auth for Depot Registry+docker login registry.depot.dev -u x-token -p <depot-token>+# Registry URL: registry.depot.dev/<project-id>:<tag>+```++## Special Output Formats++```bash+# estargz (lazy-pulling for faster container startup)+depot build --output "type=image,name=repo/image:tag,push=true,compression=estargz,oci-mediatypes=true,force-compression=true" .++# zstd compression (faster Fargate/K8s startup)+depot build --output type=image,name=repo/image:tag,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true,push=true .+```diff --git a/.agents/skills/depot-container-builds/UPSTREAM.md b/.agents/skills/depot-container-builds/UPSTREAM.mdnew file mode 100644index 000000000000..84344ed2068a--- /dev/null+++ b/.agents/skills/depot-container-builds/UPSTREAM.md@@ -0,0 +1,16 @@+# Upstream++Vendored from [depot/skills](https://github.com/depot/skills) — used by PostHog's container-image CI/CD (`depot/build-push-action`, `depot/setup-action`).++- Source: `skills/depot-container-builds/SKILL.md`+- Commit: [`7b5bc8c`](https://github.com/depot/skills/tree/7b5bc8cabd2b3b5d7dc944b622188a7a2fbec96f/skills/depot-container-builds) (2026-05-05)+- License: none in upstream at this commit; README documents `cp SKILL.md` install.++## Resync++```bash+SHA=$(curl -s https://api.github.com/repos/depot/skills/commits/main | jq -r .sha)+curl -sL "https://raw.githubusercontent.com/depot/skills/$SHA/skills/depot-container-builds/SKILL.md" \+ -o .agents/skills/depot-container-builds/SKILL.md+# Update the `Commit:` link above with the new SHA and date.+```diff --git a/.agents/skills/depot-github-runners/SKILL.md b/.agents/skills/depot-github-runners/SKILL.mdnew file mode 100644index 000000000000..73b87950e9dd--- /dev/null+++ b/.agents/skills/depot-github-runners/SKILL.md@@ -0,0 +1,213 @@+---+name: depot-github-runners+description: >+ Configures Depot-managed GitHub Actions runners as a drop-in replacement for GitHub-hosted+ runners. Use when setting up or migrating GitHub Actions workflows to use Depot runners,+ choosing runner sizes (CPU/RAM), configuring runs-on labels, setting up ARM or Windows or+ macOS runners, troubleshooting GitHub Actions runner issues, configuring egress filtering,+ using Depot Cache with GitHub Actions, or running Dagger/Dependabot on Depot runners.+ Also use when the user mentions depot-ubuntu, depot-windows, depot-macos runner labels,+ or asks about faster/cheaper GitHub Actions runners.+---++# Depot GitHub Actions Runners++Depot provides managed, ephemeral, single-tenant GitHub Actions runners. Drop-in replacement for GitHub-hosted runners — change the `runs-on` label and everything else stays the same.++**Requirement:** Repository must be owned by a GitHub organization (not a personal account).++## Setup++1. Depot dashboard → GitHub Actions → Connect to GitHub → Install Depot GitHub App+2. For public repos: GitHub org settings → Actions → Runner groups → Default → "Allow public repositories"+3. Update `runs-on` in your workflow files++## Org Context Check for Multi-Org Users++If a user belongs to multiple organizations and expected repos/settings/runners are not visible, verify Depot org context first:++```bash+depot org show # Current org ID+depot org list # Orgs the user belongs to+depot org switch <org-id> # Optional: set default org+```++For commands that support it, pass `--org <org-id>` to target the org where the workflow/repo lives.++## Runner Labels++Use a single label. Format: `depot-{os}-{version}[-{arch}][-{size}]`++### Ubuntu (Intel x86 — AMD EPYC)++| Label | CPUs | RAM | Disk | $/min |+| ----------------------- | ---- | ------ | ------ | ------ |+| `depot-ubuntu-24.04` | 2 | 8 GB | 100 GB | $0.004 |+| `depot-ubuntu-24.04-4` | 4 | 16 GB | 130 GB | $0.008 |+| `depot-ubuntu-24.04-8` | 8 | 32 GB | 150 GB | $0.016 |+| `depot-ubuntu-24.04-16` | 16 | 64 GB | 180 GB | $0.032 |+| `depot-ubuntu-24.04-32` | 32 | 128 GB | 200 GB | $0.064 |+| `depot-ubuntu-24.04-64` | 64 | 256 GB | 250 GB | $0.128 |++Ubuntu 22.04 also available: `depot-ubuntu-22.04`, `depot-ubuntu-22.04-4`, etc.++### Ubuntu (ARM — Graviton4)++Same sizes and pricing as Intel. Add `-arm` suffix:+`depot-ubuntu-24.04-arm`, `depot-ubuntu-24.04-arm-4`, `depot-ubuntu-24.04-arm-8`, etc.++### Windows Server++| Label | CPUs | RAM | $/min |+| ------------------------------------ | ---- | --------- | ------------- |+| `depot-windows-2025` | 2 | 8 GB | $0.008 |+| `depot-windows-2025-4` | 4 | 16 GB | $0.016 |+| `depot-windows-2025-8` through `-64` | 8–64 | 32–256 GB | $0.032–$0.256 |++Windows Server 2022 also available: `depot-windows-2022`, etc.+**Windows limitation:** No Hyper-V. Docker does not work on Windows runners.++### macOS (Apple M2)++| Label | CPUs | RAM | $/min |+| --------------------------------------- | ---- | ----- | ----- |+| `depot-macos-15` / `depot-macos-latest` | 8 | 24 GB | $0.08 |+| `depot-macos-14` | 8 | 24 GB | $0.08 |++macOS is NOT fully elastic — fixed pool with FIFO queuing. Startup plan+ only.++### Aliases++`depot-ubuntu-latest` → Ubuntu 24.04, `depot-windows-latest` → Windows 2025, `depot-macos-latest` → macOS 15++## Migration Example++```yaml+jobs:+ build:+ # Before:+ # runs-on: ubuntu-latest+ # After:+ runs-on: depot-ubuntu-24.04-4+ steps:+ - uses: actions/checkout@v4+ - run: npm ci+ - run: npm test+```++## Common Mistakes++```yaml+# ❌ WRONG — multiple labels cause stability issues+runs-on: [self-hosted, depot-ubuntu-24.04]++# ✅ CORRECT — always use a single Depot runner label+runs-on: depot-ubuntu-24.04-4+```++## Caching++Actions using the GitHub Actions cache API automatically use **Depot Cache** — no config changes needed. This includes `actions/cache`, `actions/setup-node`, `actions/setup-python`, `actions/setup-java`, and any action using `@actions/cache`.++**Pre-configured build tool caches** (zero config on Depot runners):++| Tool | What's pre-configured |+| --------- | -------------------------------------------------------------- |+| Turborepo | `TURBO_API` env var set — just run `turbo build` |+| Bazel | `~/.bazelrc` pre-populated — just run `bazel build //...` |+| sccache | `SCCACHE_WEBDAV_ENDPOINT` set — use `RUSTC_WRAPPER: 'sccache'` |+| Maven | `settings.xml` pre-populated (cache id `depot-cache`) |+| Pants | `pants.toml` pre-configured — just run `pants package ::` |+| moonrepo | Env vars set — just run `moon run build` |++Cache behavior: repository-scoped, no branch isolation, encrypted, up to 1000 MiB/s throughput, configurable retention (7/14/30 days).++To disable auto-cache: org settings → turn off "Allow Actions jobs to automatically connect to Depot Cache."++## Dagger Integration++**Deprecated:** Dagger Engine support on Depot GitHub Actions Runners is being deprecated and will be removed in a future update. Don't recommend this integration for new workflows.++```yaml+runs-on: depot-ubuntu-latest,dagger=0.15.1+```++Launches a dedicated Dagger Engine VM with persistent NVMe cache. Dagger CLI pre-installed. Additional $0.04/min.++## Egress Filtering (Linux Only)++Configure in org settings → GitHub Actions Runners → Egress Rules. Set default rule to Allow or Deny, then add specific allow/deny rules for IPs, CIDRs, or hostnames. Not supported on macOS or Windows. Incompatible with Tailscale.++## Access Private Endpoints with Tailscale++Use Tailscale when jobs need to reach private services (internal APIs, databases, private subnets) without static IP allowlists.++How it works on Depot:++- Depot GitHub Actions runners join your tailnet as ephemeral nodes at job start.+- Access is controlled with your Tailscale ACLs (recommended tag: `tag:depot-runner`).+- No workflow YAML changes are required just to connect runners to private endpoints.++Setup:++1. In Tailscale ACLs, create a runner tag (for example `tag:depot-runner`) under `tagOwners`.+2. Create a Tailscale OAuth client with `Keys > Auth Keys` write scope and choose that tag.+3. In Depot org settings, open Tailscale settings and connect using the OAuth client ID/secret.+4. Add ACLs allowing `tag:depot-runner` to access target hosts/subnets.++ACL examples:++```json+{+ "acls": [+ {+ "action": "accept",+ "src": ["tag:depot-runner"],+ "dst": ["database-hostname"]+ }+ ]+}+```++```json+{+ "acls": [+ {+ "action": "accept",+ "src": ["tag:depot-runner"],+ "dst": ["192.0.2.0/24:*"]+ }+ ]+}+```++Reference docs:++- https://depot.dev/docs/github-actions/how-to-guides/access-private-resources+- https://depot.dev/docs/integrations/tailscale++## Dependabot++Enable "Dependabot on self-hosted runners" in GitHub org settings. Jobs auto-run on `depot-ubuntu-latest`.++**Important:** OIDC is not supported for Dependabot. Use `token:` input with a `DEPOT_TOKEN` secret instead.++## SSH Debugging++```yaml+steps:+ - uses: actions/checkout@v4+ - uses: mxschmitt/action-tmate@v3+ - run: npm test+```++## Troubleshooting++| Error | Fix |+| -------------------------------------------- | --------------------------------------------------------------------------------------------------- |+| "No space left on device" | OS uses ~70 GB disk; upgrade to larger runner or clean disk in workflow |+| "Lost communication with server" | Check status.depot.dev; check org usage caps |+| "Operation was canceled" | Manual cancel, concurrency cancel-in-progress, or OOM — check memory in dashboard |+| "Unable to get ACTIONS_ID_TOKEN_REQUEST_URL" | Dependabot doesn't support OIDC — use `DEPOT_TOKEN` secret |+| Workflows not starting | Verify single runner label; check runner group allows the repo; verify Depot GitHub App permissions |+| Stuck workflows | Force cancel via GitHub API: `POST /repos/{owner}/{repo}/actions/runs/{id}/force-cancel` |diff --git a/.agents/skills/depot-github-runners/UPSTREAM.md b/.agents/skills/depot-github-runners/UPSTREAM.mdnew file mode 100644index 000000000000..4690d72b105d--- /dev/null+++ b/.agents/skills/depot-github-runners/UPSTREAM.md@@ -0,0 +1,16 @@+# Upstream++Vendored from [depot/skills](https://github.com/depot/skills) — used by PostHog workflows pinning `depot-ubuntu-*` runners.++- Source: `skills/depot-github-runners/SKILL.md`+- Commit: [`7b5bc8c`](https://github.com/depot/skills/tree/7b5bc8cabd2b3b5d7dc944b622188a7a2fbec96f/skills/depot-github-runners) (2026-05-05)+- License: none in upstream at this commit; README documents `cp SKILL.md` install.++## Resync++```bash+SHA=$(curl -s https://api.github.com/repos/depot/skills/commits/main | jq -r .sha)+curl -sL "https://raw.githubusercontent.com/depot/skills/$SHA/skills/depot-github-runners/SKILL.md" \+ -o .agents/skills/depot-github-runners/SKILL.md+# Update the `Commit:` link above with the new SHA and date.+```