Skip to content

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
docker-image-push
Jun 23, 2025
Merged

SBCOSS-520: Sunbird Lern - Data pipeline - create Github actions to publish docker image to GHCR#206
pallakartheekreddy merged 4 commits intorelease-8.0.0from
docker-image-push

Conversation

@chethann007
Copy link
Collaborator

@chethann007 chethann007 commented Jun 23, 2025

This PR adds a GitHub Actions workflow to the data-pipeline repository.

Build and Deploy build.yml
Triggers 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.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Loving Korbit!? Share us on LinkedIn Reddit and X

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to 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_NAME and REGISTRY_URL secrets, 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-repo artifact. You may remove or adjust this cache action to avoid redundant setup and speed up the job.
      - name: Cache Maven packages

@pallakartheekreddy pallakartheekreddy merged commit e2e23b1 into release-8.0.0 Jun 23, 2025
1 of 12 checks passed
@pallakartheekreddy pallakartheekreddy deleted the docker-image-push branch June 23, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants