Add workflow to automatically generate SQL database dumps#105
Merged
dkayiwa merged 1 commit intoopenmrs-emr3from Feb 26, 2026
Merged
Add workflow to automatically generate SQL database dumps#105dkayiwa merged 1 commit intoopenmrs-emr3from
dkayiwa merged 1 commit intoopenmrs-emr3from
Conversation
Add a GitHub Actions workflow (generate-db-dumps.yml) that can be triggered manually to generate the demo and empty SQL database dumps from a fully initialized OpenMRS Docker instance. The workflow: - Builds the OpenMRS distribution using the SDK - Starts Docker containers for OpenMRS - Waits for full initialization - Runs mysqldump to create both demo and empty database dumps - Opens a PR with the updated SQL files Also adds scripts/generate-db-dumps.sh which handles the Docker lifecycle and mysqldump execution for each database mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a manually-triggered GitHub Actions workflow (
Generate SQL Database Dumps) that automates the creation of the SQL dump files insrc/main/db/.How it works
generate-distro+build-distro)mysqldumpto create the SQL dumpsUsage
Go to Actions → Generate SQL Database Dumps → Run workflow. You can optionally override the RefApp and OpenMRS Core versions; defaults are read from
pom.xml.Files added
.github/workflows/generate-db-dumps.yml— The workflow definitionscripts/generate-db-dumps.sh— Script that handles Docker lifecycle and mysqldump for each mode (demo/empty)What this replaces
The manual process documented in the README:
mysqldump --single-transaction -u root -p openmrs > demo-db-3.4.0.sql