SBCOSS-520: Sunbird Lern - Data pipeline - create Github actions to publish docker image to GHCR#206
Merged
pallakartheekreddy merged 4 commits intorelease-8.0.0from Jun 23, 2025
Merged
Conversation
There was a problem hiding this comment.
I've completed my review and didn't find any issues... but I did find this unicorn.
/
,.. /
,' ';
,,.__ _,' /'; .
:',' ~~~~ '. '~
:' ( ) )::,
'. '. .=----=..-~ .;'
' ;' :: ':. '"
(: ': ;)
\\ '" ./
'" '"Check out our docs on how you can make Korbit work best for you and your team.
There was a problem hiding this comment.
Pull Request Overview
Adds a GitHub Actions workflow that triggers on Git tag pushes to build the Java project, package artifacts, create a Docker image, and push it to the GitHub Container Registry (GHCR).
- Introduces
build.ymlto orchestrate a two-stage pipeline: first build core modules and upload Maven cache; second build all modules, assemble distribution, build and push Docker image. - Implements Maven caching and artifact sharing between jobs to speed up builds.
- Adds flexible Docker registry login logic supporting GCP, Azure, Docker Hub, and GHCR via
vars.REGISTRY_PROVIDER.
Comments suppressed due to low confidence (3)
.github/workflows/build.yml:108
- Building each module via repeated cd/mvn commands is brittle and hard to keep in sync with your pom configuration. Consider invoking Maven at the project root (e.g.,
mvn clean install -pl notification,lms-jobs,user-org-jobs,ml-jobs -DskipTests) or using your parent POM to build all required modules in one step.
cd notification
.github/workflows/build.yml:157
- [nitpick] The workflow uses both
REGISTRY_NAMEandREGISTRY_URLsecrets, which can be confusing. Consider standardizing on one term (e.g.,REGISTRY_URL) and updating variable names and documentation for clarity.
REGISTRY_URL="$(echo "${{ secrets.REGISTRY_URL }}/$(basename "${{ github.workspace }}")" | tr '[:upper:]' '[:lower:]')"
.github/workflows/build.yml:134
- This step duplicates Maven caching already provided by restoring the uploaded
maven-repoartifact. You may remove or adjust this cache action to avoid redundant setup and speed up the job.
- name: Cache Maven packages
pallakartheekreddy
approved these changes
Jun 23, 2025
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.
This PR adds a GitHub Actions workflow to the
data-pipelinerepository.Build and Deploy
build.ymlTriggers when a Git tag is pushed.
Builds the project, packages the artifact, builds a Docker image, and pushes it to GitHub Container Registry (GHCR).
Description by Korbit AI
What change is being made?
Create a GitHub Actions workflow to build and push a Docker image to the GitHub Container Registry (GHCR.io) upon tagging a release.
Why are these changes being made?
This change automates the process of building and distributing application Docker images by using GitHub Actions, which streamlines deployments and ensures consistency across builds. The approach supports different registry providers and leverages caching to optimize build times, offering efficiency and scalability for the Sunbird Lern data pipeline project.