Add docker build and publish to ghcr.io #383
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a proposed update to the CI to publish a container to your ghcr.io repo. You will likely have to go edit the permissions of the container in github after it creates it the first time, to allow this repository write access to the container. You can modify this however you wish; I am using the format commonly used at Kadena where we call the tags 'sha-xxxxxxx' and 'branchname'. A 'release' workflow or release override version of this workflow could be used to manually run this CI and append the tag 'latest' to the last released version.
This is helpful for us because we have workflows that reference this indexer repo and build the container for doing various integration tests. We just pull of the main branch here and thus may be subject to unstable changes. As things are under development it could be fine to just point to :main on our side for now, but eventually having a stable :latest would be good for consistency.
Other notes: there is a Dockerfile.development and a Dockerfile in the main repo here; we have been using the .development one because that is the one that worked correctly a while ago when we started this. I am unsure of the practical differences, but I imagine it could all be done in the main Dockerfile.
For an example of our use of this repo in a docker compose setup for local testing, see this file: https://github.com/kadena-io/devnet/blob/main/docker-compose.indexer.yaml