OHDSI / Hades

Health Analytics Data-to-Evidence Suite (HADES): A collection of R packages for performing analytics against the Common Data Model.
https://ohdsi.github.io/Hades
Apache License 2.0
22 stars 11 forks source link

docker build action follows OHDSI/WebAPI pattern #17

Closed natb1 closed 1 year ago

natb1 commented 1 year ago

This PR adds a GH action that builds and publishes a docker image whenever there is a GH release. The docker build follows the same pattern found in OHDSI/WebApi.

schuemie commented 1 year ago

Nice!

Would you mind renaming the workflow to something less generic? We may want to have other types of releases in the future (e.g. releases as renv lock files). Maybe release_docker?

natb1 commented 1 year ago

Sure thing, renamed to release_docker

schuemie commented 1 year ago

Thanks!

leeevans commented 1 year ago

Thanks @natb1 for developing this GitHub docker build action. It is a significant improvement in the OHDSI build process for maintaining up to date, versioned OHDSI HADES Docker images that will track the latest HADES releases and provide better support for reproducibility!

Thanks @schuemie for approving this pull request.

schuemie commented 1 year ago

Shall I create a release just to trigger the workflow?

leeevans commented 1 year ago

Thanks @schuemie for triggering the workflow.

I see from the action log that we will need to adjust the way the Docker build action handles the GITHUB_PAT. I'll follow up with @natb1 on that.

We can also update the action so we have the option to manually trigger it in GitHub for troubleshooting.

schuemie commented 1 year ago

I actually just manually triggered the action, so no need to do anything for that, because it seems to already work.

natb1 commented 1 year ago

Yes, it just needs a few secrets added to the repo. With those it should pass - happy to change it if you guys prefer another way.

leeevans commented 1 year ago

@natb1 the following two GitHub secrets are already defined:

DOCKER_HUB_ACCESS_TOKEN DOCKER_HUB_USERNAME

A secret called GH_TOKEN is also already defined, so I'd appreciate it if you could update the action to rename GITHUBPAT to GH_TOKEN.

I'm not sure how the DOCKER_IMAGE secret is intended to be used. I see it referenced in the action here:

  DOCKER_IMAGE: ${{ inputs.docker_image || secrets.DOCKER_IMAGE }}

If it's intended to be specific to this HADES Docker action then I would prefer to call the secret HADES_DOCKER_IMAGE.

It would be great if you could provide an example of the usage of the DOCKER_IMAGE secret.

leeevans commented 1 year ago

@natb1 as agreed on our call today, I have created the new OHDSI GitHub secret called HADES_DOCKER_IMAGE. Feel free to submit a new pull request for the github action with the needed secret name changes and we can rerun it

natb1 commented 1 year ago

Secret names updated here: https://github.com/OHDSI/Hades/pull/18