Skip to content

: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.

chore(ci): publish posthog-node to the shared-services ECR (#125495)

Michi5b08eea3f9b4
diff --git a/.github/workflows/ci-nodejs-container.yml b/.github/workflows/ci-nodejs-container.yml
index 301ddc2a6ff2..c0c07d6cc1e3 100644
--- a/.github/workflows/ci-nodejs-container.yml
+++ b/.github/workflows/ci-nodejs-container.yml
@@ -127,7 +127,8 @@ jobs:
# via the master role; everything else → posthog-node-prs via the prs role.
env:
ECR_IMAGE: ${{ github.ref == 'refs/heads/master' && 'posthog-node' || 'posthog-node-prs' }}
- ECR_ROLE: ${{ github.ref == 'refs/heads/master' && vars.AWS_ECR_POSTHOG_MASTER_PUBLISH_IAM_ROLE || vars.AWS_ECR_POSTHOG_PRS_PUBLISH_IAM_ROLE }}
+ # Both repos live in the shared-services ECR, where prod pulls posthog-node.
+ ECR_ROLE: ${{ github.ref == 'refs/heads/master' && secrets.AWS_ECR_SHARED_SERVICES_POSTHOG_MASTER_PUBLISH_IAM_ROLE || secrets.AWS_ECR_SHARED_SERVICES_POSTHOG_PRS_PUBLISH_IAM_ROLE }}
steps:
# Fail loudly rather than let the role ternary silently fall back to the PRS
@@ -136,10 +137,10 @@ jobs:
- name: Assert master publish role is configured
if: github.ref == 'refs/heads/master'
env:
- MASTER_ROLE: ${{ vars.AWS_ECR_POSTHOG_MASTER_PUBLISH_IAM_ROLE }}
+ MASTER_ROLE: ${{ secrets.AWS_ECR_SHARED_SERVICES_POSTHOG_MASTER_PUBLISH_IAM_ROLE }}
run: |
if [[ -z "$MASTER_ROLE" ]]; then
- echo "::error::AWS_ECR_POSTHOG_MASTER_PUBLISH_IAM_ROLE is not set — refusing to fall back to the PRS role on master."
+ echo "::error::AWS_ECR_SHARED_SERVICES_POSTHOG_MASTER_PUBLISH_IAM_ROLE is not set — refusing to fall back to the PRS role on master."
exit 1
fi
@@ -359,7 +360,7 @@ jobs:
if: ${{ steps.ordered-release.outputs.tag != '' }}
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
with:
- role-to-assume: ${{ vars.AWS_ECR_POSTHOG_MASTER_PUBLISH_IAM_ROLE }}
+ role-to-assume: ${{ secrets.AWS_ECR_SHARED_SERVICES_POSTHOG_MASTER_PUBLISH_IAM_ROLE }}
aws-region: us-east-1
- name: Log in to Amazon ECR for ordered image alias