Build and publish container images
Closes: https://github.com/balzack/databag/issues/150
This PR adds 2 new workflows
- build-and-push-table-image: Whenever a new tag is created in the form of
v*.*.*, this workflow will be triggered and container images will be built and pushed to ghcr with the provided version as a tag. - build-and-push-test-image: Runs on PRs that are opened on main. This is so we can test that the image build is successful with the changes, and also so one can test the actual image in deployment before merging.
Other changes:
- Add instructions to the readme for deployment using docker compose
- Updated the Dockerfile to support running consecutive builds on different architectures. This way we can publish arm64 and amd64 images in the same CI workflow.
@balzack I think you'll need to setup a GITHUB_TOKEN secret in the repository settings with write access to packages
Could someone look over the doc changes and let me know if they make sense?
The test pr seems a bit overkill, it's faster to checkout the pr locally and try it than waiting for GitHub to build it, then copy over locally.
Someone even without any knowledge of git can use the GitHub instructions of their GitHub cli then run the dev docker compose.
Two commands:
gh pr checkout 1337
make dev-start
Great improvements on the cache locations 👍
Would you be able to test this code on a personal public Fork? It a bit iffy to merge without testing the full process.