infoderm / patients

:face_with_thermometer: Patients meteor app
GNU Affero General Public License v3.0
5 stars 2 forks source link

Split `ci:build:compose` into a `build` job and a `test` job #886

Closed make-github-pseudonymous-again closed 4 months ago

make-github-pseudonymous-again commented 4 months ago

Need to figure out how to reuse the built image from docker/bake-action in a different job.

make-github-pseudonymous-again commented 4 months ago

Can also exploit https://github.com/docker/bake-action?tab=readme-ov-file#subactions to abstract away the required build targets and build them concurrently.

make-github-pseudonymous-again commented 4 months ago

See https://github.com/orgs/community/discussions/26723#discussioncomment-3253091 for a potential solution.

make-github-pseudonymous-again commented 4 months ago

See also https://github.com/docker/build-push-action/issues/225.

make-github-pseudonymous-again commented 4 months ago

Note that we currently use load: true, so we would need to use --set=*.output=type=docker,dest=/tmp/image.tar. This will need some work if we want to combine with https://github.com/infoderm/patients/issues/886#issuecomment-2060871103 to support multiple targets generically in the future.

make-github-pseudonymous-again commented 4 months ago

Not sure if docker load ... will be sufficient for docker compose to pick up the built image without a cache. Not sure how to configure the cache. Not sure how it is configured by default.