Skip to content

Make the nightly database-in-image refresh work on GitHub Actions #3182

Description

@AlexSkrypnyk

Summary

The nightly database job refreshes a database-in-image project's image on CircleCI, but the GitHub Actions database job in .github/workflows/build-test-deploy.yml has never had any database-in-image handling. A GitHub Actions project with VORTEX_DB_IMAGE set gets no fresh image from its nightly run, and with the container_registry fetch source the Export DB step fails.

Details

How CircleCI does it

#3180 (for #3177) makes the CircleCI flow work. When VORTEX_DB_IMAGE and VORTEX_DB_IMAGE_BASE are set and VORTEX_FETCH_DB_SOURCE isn't container_registry, the Export DB step:

  1. Runs vortex-fetch-db with the container_registry source and VORTEX_FETCH_DB_CONTAINER_REGISTRY_IMAGE_BASE passed in, so vortex-fetch-db-container-registry pulls the base image and tags it as VORTEX_DB_IMAGE. docker compose up then builds the database service from that clean base.
  2. Runs vortex-provision with VORTEX_DB_IMAGE cleared, so the empty database is provisioned from the dump file. vortex-provision itself knows nothing about the base image.
  3. Runs vortex-export-db with VORTEX_DB_IMAGE set, which exports the database as an image, and the Deploy DB image step pushes it with vortex-push-db-image.

What the GitHub Actions database job is missing

  • The Adjust variables for a scheduled run step sets neither VORTEX_DB_IMAGE_BASE nor VORTEX_EXPORT_DB_CONTAINER_REGISTRY_PUSH_PROCEED.
  • There's no Deploy DB image step. The push used to live inside vortex-export-db until Extract the container image deployment from 'export-db' into a dedicated script #2723 moved it into its own step, and only CircleCI got one.
  • The Export DB step runs docker compose --progress quiet cp -L .data/db.sql cli:/app/.data/db.sql without || true, so it fails for the container_registry source, which fetches no dump file. CircleCI tolerates the missing file.
  • It doesn't remove .data/db.sql after the import for database-in-image projects (CircleCI runs grep -q ^VORTEX_DB_IMAGE .env && rm .data/db.sql || true), so the cache stores both the dump and the image archive.
  • It has none of the base image handling from the CircleCI Export DB step described above.
  • The template's own database-in-image test workflows (DIDI-FI and DIDI-II in .circleci/vortex-test-common.yml) run on CircleCI only, so nothing exercises this path on GitHub Actions.

To fix

  1. Set VORTEX_DB_IMAGE_BASE and VORTEX_EXPORT_DB_CONTAINER_REGISTRY_PUSH_PROCEED=1 for the scheduled run.
  2. Add a Deploy DB image step that mirrors the CircleCI one.
  3. Make Export DB tolerate a missing dump file, and remove the dump after the import for database-in-image projects.
  4. Add the base image handling from the CircleCI Export DB step: tag the base through vortex-fetch-db with the container_registry source, and run vortex-provision with VORTEX_DB_IMAGE cleared.
  5. Cover the flow in the template's GitHub Actions tests.

Activity

  1. added this to the 1.42.0 milestone on Oct 8, 2026
  2. added 4 commits that reference this issue on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A3Board worker 3

    Type

    No type

    Projects

    • Status
      Release queue

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions