Skip to content

O3-5649: Use GitHub Artifacts for spa-assemble-config.json#1010

Open
Bawanthathilan wants to merge 3 commits into
openmrs:mainfrom
Bawanthathilan:O3-5649
Open

O3-5649: Use GitHub Artifacts for spa-assemble-config.json#1010
Bawanthathilan wants to merge 3 commits into
openmrs:mainfrom
Bawanthathilan:O3-5649

Conversation

@Bawanthathilan
Copy link
Copy Markdown
Contributor

@Bawanthathilan Bawanthathilan commented May 5, 2026

Summary

Update workflow to use GitHub Artifacts for spa-assemble-config.json instead of re-downloading the Docker image.

Changes

  • Extract and upload config as artifact in build job
  • Download artifact in deploy job

openmrs.atlassian.net/browse/O3-5649

Comment thread .github/workflows/build-frontend.yml Outdated
- name: Extract spa-assemble-config.json
run: |
IMAGE="${{ env.IMAGE }}:${{ env.DOCKER_IMAGE_TAG }}"
docker pull $IMAGE
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I was reviewing this pipeline and had a quick question about this step. Since we just built the Docker image in the same job, could we skip the docker pull and just directly docker create the container from the local cache?

I'm guessing we have to pull it because the docker/build-push-action is performing a multi-platform build, which pushes the image directly to the registry and prevents it from loading into the runner's docker daemon? Just wanted to confirm if that was the case.

Copy link
Copy Markdown
Member

@jayasanka-sack jayasanka-sack May 6, 2026

Choose a reason for hiding this comment

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

Yeah, no need to pull. We should use the image built by the job.

uses: actions/upload-artifact@v4
with:
name: spa-assemble-config
path: ./spa-assemble-config.json
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since the spa-assemble-config.json file is only needed for the next job, it only needs to be stored temporarily. We can limit it using retention-days: 1. Is this is a valid approach?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yes, 1 day would be more than enough.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks i will update my PR @Pujan-khunt

@jayasanka-sack jayasanka-sack changed the title feat: use GitHub Artifacts for spa-assemble-config.json O3-5649: Use GitHub Artifacts for spa-assemble-config.json May 6, 2026
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.

4 participants