Sage-Bionetworks / synapsePythonClient

Programmatic interface to Synapse services for Python
https://www.synapse.org
Apache License 2.0
67 stars 68 forks source link

[SYNPY-1341] Add CI step to containerize and upload synpy to the GHCR #1100

Closed jaymedina closed 4 months ago

jaymedina commented 4 months ago

problem

We recently added a GHCR image for the python client because there was no up-to-date image hosted anywhere. We should add a step to the CI workflow to publish new versions of the client as docker images automatically when a new version is released.

solution

Two new jobs (ghcr-build-and-push-on-merge, ghcr-build-and-push-on-develop) are created to build a multi-platform image of the repository and push it to the GitHub Container Registry.

ghcr-build-and-push-on-release

ghcr-build-and-push-on-develop

ghcr-build-and-push-on-release

I manually fed a version v1.2.3test that will be fed into the Build and push Docker image step to test that this communication happens between Extract Release Version and Build and push Docker image.

image

Triggering the job results in a new release with the expected version name

image

I pulled the docker image and ran a container to confirm that the latest version v4.2.0 of the python client is running in the container:

image

ghcr-build-and-push-on-develop

develop image tag name reflects the latest commit it points to. Below is the example for commit https://github.com/Sage-Bionetworks/synapsePythonClient/pull/1100/commits/830399960ebf890e045220b8c68a08a9e953e8b5 of this branch:

image
jaymedina commented 4 months ago

This PR is now ready for a final review.

Latest changes:

image

image

Feedback is welcome. Thanks!

jaymedina commented 4 months ago

Great thanks @BryanFauble - Once all tests pass I'll squash and merge this.