Skip to content

Configure Growth endpoint with Actions variables#3120

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/growth-endpoint-environment-variable
Jul 15, 2026
Merged

Configure Growth endpoint with Actions variables#3120
ChiragAgg5k merged 1 commit into
mainfrom
fix/growth-endpoint-environment-variable

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Summary

  • source the public Growth endpoint from GitHub Actions variables instead of secrets
  • bind the staging Console image job to the staging GitHub Environment
  • allow VITE_APPWRITE_GROWTH_ENDPOINT to resolve to the staging environment override while other images retain the repository-level production value

Repository setup

Before the next release, an administrator must create the staging GitHub Environment and configure:

VITE_APPWRITE_GROWTH_ENDPOINT=https://growth.staging.appwrite.io/v1

The existing repository-level variable remains https://growth.appwrite.io/v1.

Testing

  • actionlint .github/workflows/publish.yml
  • git diff --check

@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves the PUBLIC_GROWTH_ENDPOINT build argument from a repository secret (secrets.PUBLIC_GROWTH_ENDPOINT) to a GitHub Actions variable (vars.VITE_APPWRITE_GROWTH_ENDPOINT) across all four publish jobs, and binds publish-cloud-stage to a new staging GitHub Environment so it picks up an environment-scoped override pointing at the staging Growth API.

  • All four Docker publish jobs now reference vars.VITE_APPWRITE_GROWTH_ENDPOINT; the publish-cloud-stage job additionally gains environment: staging, allowing the staging environment's variable to override the repository-level value.
  • Two infrastructure pre-conditions must be met before the next release: the staging environment must be created in repository settings (missing it hard-fails publish-cloud-stage), and the repository-level variable VITE_APPWRITE_GROWTH_ENDPOINT must be provisioned with the production endpoint (the variable name changed from PUBLIC_GROWTH_ENDPOINT).

Confidence Score: 4/5

Safe to merge if both the staging GitHub Environment and the repo-level VITE_APPWRITE_GROWTH_ENDPOINT variable are provisioned before the next release publishes.

The workflow change is straightforward and the intent is clear, but it introduces two hard infrastructure pre-conditions: the staging environment must exist (otherwise the staging job fails immediately on the next release), and the repo-level variable must have been renamed/recreated (otherwise three production jobs silently bake in an empty growth endpoint). The PR description documents these requirements, but they have not yet been fulfilled at the time of review, leaving a real breakage window between merge and the next release.

.github/workflows/publish.yml — confirm both the staging environment and the repo-level VITE_APPWRITE_GROWTH_ENDPOINT variable are in place before the next release is published.

Important Files Changed

Filename Overview
.github/workflows/publish.yml Switches all four publish jobs from secrets.PUBLIC_GROWTH_ENDPOINT to vars.VITE_APPWRITE_GROWTH_ENDPOINT, and binds publish-cloud-stage to a new staging GitHub Environment to pick up an environment-scoped override. The staging environment must be created before the next release or the staging job will immediately fail; the renamed repo-level variable must also exist or three other jobs silently bake an empty growth endpoint.

Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
.github/workflows/publish.yml:51
**Staging environment must exist before next release fires**

Referencing `environment: staging` causes GitHub Actions to immediately fail the job if the `staging` environment does not exist in the repository's Settings → Environments. The PR description documents this pre-condition, but until the environment is provisioned, any published release will hard-fail the `publish-cloud-stage` job — blocking the staging Docker image from being built and pushed.

### Issue 2 of 2
.github/workflows/publish.yml:45
**Silent empty string if repo-level variable is absent**

`vars.VITE_APPWRITE_GROWTH_ENDPOINT` resolves to an empty string — with no error or warning — when the Actions variable has not been created at repository scope. Unlike the previous `secrets.*` approach (same silent-empty behavior), the variable name has changed from `PUBLIC_GROWTH_ENDPOINT` to `VITE_APPWRITE_GROWTH_ENDPOINT`. If the new repo-level variable is not yet provisioned, the production `publish-cloud`, `publish-self-hosted`, and `publish-cloud-no-regions` jobs will all bake an empty `PUBLIC_GROWTH_ENDPOINT` into their Docker images silently. The PR description states the variable "remains" in place, so this is low-risk in practice, but worth verifying before the next release.

Reviews (1): Last reviewed commit: "fix: configure Growth endpoint with Acti..." | Re-trigger Greptile

Comment thread .github/workflows/publish.yml
Comment thread .github/workflows/publish.yml
@ChiragAgg5k
ChiragAgg5k merged commit c34e081 into main Jul 15, 2026
2 of 4 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/growth-endpoint-environment-variable branch July 15, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants