pokt-network / pocket-core

Official implementation of the Pocket Network Protocol
http://www.pokt.network
MIT License
208 stars 101 forks source link

[CI/Containers] Add image build workflow #1557

Closed okdas closed 1 year ago

okdas commented 1 year ago

Description

With our decision to switch to GitHub Packages as the Container Registry for v0, it becomes easier to use the workflow to push the image.

To ensure a seamless transition, I have used an existing multi-arch build as a base. This means that existing deployments should not be affected or break due to the changes.

To validate the compatibility, I conducted tests on my own node by replacing the poktnetwork/pocket-core:RC-0.9.2 image with the one generated by this workflow. The tests indicated that everything functioned as expected, without any issues.

Registry link: https://github.com/pokt-network/pocket-core/pkgs/container/pocket-v0

Summary generated by Reviewpad on 07 Jun 23 22:17 UTC

This pull request adds an image build workflow, with a Dockerfile, build-images.yaml, and entrypoint.sh. The workflow handles build and push of images to GitHub Container Registry, while staging is set as the main branch. Additionally, the patch checks if it works with PR events.

okdas commented 1 year ago

Thank you for the review. This should work just fine for release tags as well, but there's no guarantee due to the difference in the type of the GitHub Actions event. In the worst case scenario, I'll need to open another PR to fix any potential issues. :)