: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(ci): gate container workflows on trigger-level paths (#68975)
Raúl Negrón-Otero85dcd58f3435
diff --git a/.github/workflows/cd-llm-analytics-image.yml b/.github/workflows/cd-llm-analytics-image.ymlindex 4bd02217ffef..0ca4edc5c4a5 100644--- a/.github/workflows/cd-llm-analytics-image.yml+++ b/.github/workflows/cd-llm-analytics-image.yml@@ -22,8 +22,22 @@ on:- '.github/workflows/cd-llm-analytics-image.yml'- 'pyproject.toml'- 'bin/temporal-django-worker'+ # paths mirror the push trigger; the build-llm-analytics-image label only+ # forces a build on PRs touching these paths, use workflow_dispatch otherwise.pull_request:types: [opened, synchronize, reopened, labeled]+ paths:+ - 'posthog/temporal/ai_observability/**'+ - 'posthog/temporal/llm_analytics/**'+ - 'products/ai_observability/**'+ - 'products/llm_analytics/**'+ - 'posthog/temporal/common/**'+ - 'posthog/management/commands/start_temporal_worker.py'+ - 'posthog/clickhouse/migrations/**'+ - 'Dockerfile.llm-analytics'+ - '.github/workflows/cd-llm-analytics-image.yml'+ - 'pyproject.toml'+ - 'bin/temporal-django-worker'workflow_dispatch:jobs:diff --git a/.github/workflows/cd-mcp-image.yml b/.github/workflows/cd-mcp-image.ymlindex a3b6cafeb4ee..0d2376f2dd83 100644--- a/.github/workflows/cd-mcp-image.yml+++ b/.github/workflows/cd-mcp-image.yml@@ -13,8 +13,13 @@ on:paths:- 'services/mcp/**'- '.github/workflows/cd-mcp-image.yml'+ # paths mirror the push trigger; the build-mcp-image label only forces a+ # build on PRs touching these paths, use workflow_dispatch otherwise.pull_request:types: [opened, synchronize, reopened, labeled]+ paths:+ - 'services/mcp/**'+ - '.github/workflows/cd-mcp-image.yml'workflow_dispatch:jobs:diff --git a/.github/workflows/cd-sandbox-base-image.yml b/.github/workflows/cd-sandbox-base-image.ymlindex 2d9b384a647e..00ecab433557 100644--- a/.github/workflows/cd-sandbox-base-image.yml+++ b/.github/workflows/cd-sandbox-base-image.yml@@ -4,7 +4,13 @@ on:push:branches:- master+ # paths mirror the changes job's dorny filter, which still gates push events.pull_request:+ paths:+ - '.github/workflows/cd-sandbox-base-image.yml'+ - 'products/tasks/backend/sandbox/images/**'+ - 'products/*/skills/**'+ - 'products/posthog_ai/scripts/**'workflow_dispatch:jobs:@@ -31,6 +37,7 @@ jobs:id: filterwith:token: ${{ steps.app-token.outputs.token || github.token }}+ # Keep in sync with the trigger-level pull_request paths above.filters: |sandbox_image:- '.github/workflows/cd-sandbox-base-image.yml'@@ -249,6 +256,10 @@ jobs:# Single required status check for branch protection. Add future sandbox# image jobs to `needs` here rather than reconfiguring GitHub.+ # NOT registered as required yet: the trigger-level pull_request paths+ # filter means this check never reports on PRs that don't touch sandbox+ # paths, and a required check that never reports blocks merging forever.+ # Before registering it in the ruleset, remove that paths filter.sandbox_base_image_check:needs: [changes, build_skills, sandbox_base_build]name: Sandbox Base Image Passdiff --git a/.github/workflows/ci-agent-container.yml b/.github/workflows/ci-agent-container.ymlindex dfb6e8ef2227..21d5a5865ac1 100644--- a/.github/workflows/ci-agent-container.yml+++ b/.github/workflows/ci-agent-container.yml@@ -8,7 +8,25 @@ name: Build and deploy agent platform container imageson:workflow_dispatch:+ # paths mirror the changes job's dorny filter, which still gates push and+ # merge_group events (merge_group triggers don't support paths).pull_request:+ paths:+ - 'products/agent_platform/services/**'+ - 'products/agent_platform/packages/**'+ # Transitional: in-flight branches still have these at the+ # old paths. Drop once they've rebased onto the move.+ - 'services/agent-ingress/**'+ - 'services/agent-runner/**'+ - 'services/agent-janitor/**'+ - 'services/agent-shared/**'+ - 'services/agent-tools/**'+ - 'services/agent-sandbox-host/**'+ - 'services/agents/**'+ - 'packages/quill/**'+ - '.github/workflows/ci-agent-container.yml'+ - 'pnpm-lock.yaml'+ - 'pnpm-workspace.yaml'merge_group:push:branches:@@ -43,6 +61,7 @@ jobs:id: filterwith:token: ${{ steps.app-token.outputs.token || github.token }}+ # Keep in sync with the trigger-level pull_request paths above.filters: |agent_files:- 'products/agent_platform/services/**'diff --git a/.github/workflows/ci-nodejs-container.yml b/.github/workflows/ci-nodejs-container.ymlindex 0cc6900be655..af4bd11ed68c 100644--- a/.github/workflows/ci-nodejs-container.yml+++ b/.github/workflows/ci-nodejs-container.yml@@ -2,7 +2,25 @@ name: Build and deploy node container imageon:workflow_dispatch:+ # paths mirror the changes job's dorny filter, which still gates push and+ # merge_group events (merge_group triggers don't support paths).pull_request:+ paths:+ - 'nodejs/**'+ - 'common/hogvm/typescript/**'+ - 'common/plugin_transpiler/**'+ - 'common/esbuilder/**'+ - 'common/replay-shared/**'+ - 'common/replay-headless/**'+ - 'rust/cyclotron-node/**'+ - 'rust/common/hogvm/**'+ - 'rust/replay-anonymizer-node/**'+ - 'Dockerfile.node'+ - '.github/workflows/ci-nodejs-container.yml'+ - 'turbo.json'+ - 'package.json'+ - 'pnpm-lock.yaml'+ - 'pnpm-workspace.yaml'merge_group:push:branches:@@ -37,6 +55,7 @@ jobs:id: filterwith:token: ${{ steps.app-token.outputs.token || github.token }}+ # Keep in sync with the trigger-level pull_request paths above.filters: |node_files:- 'nodejs/**'diff --git a/.github/workflows/ci-recording-rasterizer-container.yml b/.github/workflows/ci-recording-rasterizer-container.ymlindex b690ee9b1107..716890123d9d 100644--- a/.github/workflows/ci-recording-rasterizer-container.yml+++ b/.github/workflows/ci-recording-rasterizer-container.yml@@ -2,7 +2,27 @@ name: Build and deploy recording-rasterizer container imageon:workflow_dispatch:+ # paths mirror the changes job's dorny filter, which still gates push and+ # merge_group events (merge_group triggers don't support paths).pull_request:+ paths:+ - 'nodejs/**'+ - 'common/hogvm/typescript/**'+ - 'common/plugin_transpiler/**'+ - 'common/esbuilder/**'+ - 'common/replay-shared/**'+ - 'common/replay-headless/**'+ - 'rust/cyclotron-node/**'+ - 'rust/cyclotron-core/**'+ - 'Dockerfile.recording-rasterizer'+ - '.github/workflows/ci-recording-rasterizer-container.yml'+ - 'bin/turbo'+ - 'patches/**'+ - 'turbo.json'+ - 'tsconfig.json'+ - 'package.json'+ - 'pnpm-lock.yaml'+ - 'pnpm-workspace.yaml'merge_group:push:branches:@@ -41,6 +61,7 @@ jobs:id: filterwith:token: ${{ steps.app-token.outputs.token || github.token }}+ # Keep in sync with the trigger-level pull_request paths above.filters: |rasterizer_files:- 'nodejs/**'