Skip to content

Commit 2c63af2

Browse files
fix(ci): sync-db jobs depend on both fragments; fix docs links and missing variable
Agent-Logs-Url: https://github.com/BehindTheMusicTree/hear-the-music-tree-api/sessions/f3419d07-8b3e-4497-9607-286d5030cff4 Co-authored-by: Andreas-Garcia <5967215+Andreas-Garcia@users.noreply.github.com>
1 parent 04dbce9 commit 2c63af2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/sync-env-to-server.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ jobs:
181181

182182
sync-db-staging:
183183
name: Sync Postgres env (staging)
184-
needs: [build-db-fragment]
184+
needs: [build-api-fragment, build-db-fragment]
185185
uses: BehindTheMusicTree/github-workflows/.github/workflows/sync-env-to-server.yml@main
186186
with:
187187
sync_env: staging
@@ -191,7 +191,7 @@ jobs:
191191

192192
sync-db-prod:
193193
name: Sync Postgres env (prod)
194-
needs: [build-db-fragment]
194+
needs: [build-api-fragment, build-db-fragment]
195195
uses: BehindTheMusicTree/github-workflows/.github/workflows/sync-env-to-server.yml@main
196196
with:
197197
sync_env: prod

docs/workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Single publish workflow: collect static files, build Docker image, set image tag
7373
1. **determine-version** – from ref: main → staging + TEST; tag with `-` → TEST; tag without `-` → PROD
7474
2. **static** – calls `static-files.yml`, commits and pushes collected static files
7575
3. **build-and-push** – calls `build-and-push.yml` with commit hash and **environment** (TEST or PROD)
76-
4. **check-pinned-tags** – requires **`AFP_VERSION`** in Settings → Variables (no `latest`); DB image is **`postgres:16.4`** (fixed in [`docker-compose.yml`](docker-compose.yml); publish sets server DB tag **`16.4`**)
76+
4. **check-pinned-tags** – requires **`AFP_VERSION`** in Settings → Variables (no `latest`); DB image is **`postgres:16.4`** (fixed in [`docker-compose.yml`](../docker-compose.yml); publish sets server DB tag **`16.4`**)
7777
5. **set-version-api** / **set-version-db** / **set-version-afp** – shared workflows from `BehindTheMusicTree/github-workflows`
7878
6. **redeploy-webhook-call** – shared workflow **`call-redeployment-webhook`** (pinned **`@v0.3.0`**) with required **`hook_id_base: ${{ vars.REDEPLOYMENT_HOOK_ID_BASE }}`** and **`secrets: inherit`**
7979

@@ -109,7 +109,7 @@ Manually sync app env vars and secrets for **both STAGING and PROD** in one run.
109109

110110
**Secrets (this repo, per environment):** `DB_APP_DB_NAME`, `DB_APP_USERNAME`, `DB_APP_USER_PASSWORD`, `DB_SUPERUSER_PASSWORD`, `DEMO_PASSWORD`, `DEMO_USERNAME`, `DJANGO_SECRET_KEY`, `GOOGLE_CLIENT_SECRET`, `SPOTIFY_CLIENT_SECRET`, `SUPERADMIN_PASSWORD`, `SUPERADMIN_USERNAME`, `TMTA_USERNAME`, plus deploy secrets `SERVER_DEPLOY_USERNAME`, `SERVER_DEPLOY_SSH_PRIVATE_KEY`.
111111

112-
**Variables (this repo or org, per GitHub Environment):** `SERVER_HOST`, `REDEPLOYMENT_ROOT`, `SYNC_ENV_REMOTE_FILENAME_PREFIX_BASE`, `HTMT_API_APP_NAME`, `DEMO_EMAIL`, `SUPERADMIN_EMAIL`, `SPOTIFY_CLIENT_ID_STAGING`, `SPOTIFY_CLIENT_ID_PROD`, `GOOGLE_CLIENT_ID_STAGING`, `GOOGLE_CLIENT_ID_PROD`, **`SPOTIFY_SCOPES`** (see `env/dev/.env.dev.example`). The compose-required API booleans above are **not** Variables—they are written as **`true`** in the workflow. Locally and in CI you still set **`FILE_UPLOAD_ENABLED`** in `.env` as needed (see `api/settings.py` / `TMP_UPLOADED_FILES`).
112+
**Variables (this repo or org, per GitHub Environment):** `SERVER_HOST`, `REDEPLOYMENT_ROOT`, `SYNC_ENV_REMOTE_FILENAME_PREFIX_BASE`, `HTMT_API_APP_NAME`, **`DB_APP_NAME_SUFFIX`** (required, non-empty; must match **BehindTheMusicTree/infrastructure**, e.g. `_db`), `DEMO_EMAIL`, `SUPERADMIN_EMAIL`, `SPOTIFY_CLIENT_ID_STAGING`, `SPOTIFY_CLIENT_ID_PROD`, `GOOGLE_CLIENT_ID_STAGING`, `GOOGLE_CLIENT_ID_PROD`, **`SPOTIFY_SCOPES`** (see `env/dev/.env.dev.example`). The compose-required API booleans above are **not** Variables—they are written as **`true`** in the workflow. Locally and in CI you still set **`FILE_UPLOAD_ENABLED`** in `.env` as needed (see `api/settings.py` / `TMP_UPLOADED_FILES`).
113113

114114
## Static Files
115115

0 commit comments

Comments
 (0)