If you’ve been following along with OpenMRS development, you will have noticed we’ve been shifting our CI off of Bamboo and onto GitHub Actions in preparation for Bamboo being sunset in March 2029. As part of this work, we’ve developed a series of re-usable GitHub Workflows (and related Actions) to run our CI / CD tasks, including actions to build Maven projects, publish releases, and do the same for frontend modules.
These workflows are designed to be easy to use and take advantage of OpenMRS conventions and some embedded knowledge. For example a fairly short configuration like:
name: Build with Maven
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
uses: openmrs/openmrs-contrib-gha-workflows/.github/workflows/build-backend-module.yml@beta
with:
deploy_snapshots: ${{ github.repository_owner == 'acme' }}
secrets:
MAVEN_REPO_USERNAME: ${{ secrets.MAVEN_USER }}
MAVEN_REPO_API_KEY: ${{ secrets.MAVEN_TOKEN }}
Will infer (from any declared version of OpenMRS core in the module’s dependencies), which versions of Java this should be built and tested against and then publish SNAPSHOT versions to the module’s configured Maven repository. These help standardize our workflows and we hope they can be leveraged by implementers and other community organizations to help maintain their GitHub workflows.
To help figuring out how to use these workflows and the options available in them, we’ve published a new site that documents how to use them and the various configuration options they support.
The most recent versions are available under the tag beta (SHA: c3a3f8a247c84040ace3b0025d7d953002131c9c), but you are also welcome to track @main to get the most recent version. After we’ve had some time to iron-out any initial bugs, we will be releasing version 1.0.0 (tagged both v1 and v1.0.0) and will commit to following standard SemVer for tagged versions so you can stick with copies that are known to work and upgrade at your convenience.
We hope this will be a useful resource for the community. Feel free to reply to this thread with any questions, thoughts or issues (though technical issues can also be reported in the INFRA Jira project).
Happy coding!