-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker workflow updates #195
base: main
Are you sure you want to change the base?
Conversation
Combined Docker-related workflows
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #195 +/- ##
==========================================
+ Coverage 57.32% 57.34% +0.01%
==========================================
Files 600 600
Lines 80100 80100
==========================================
+ Hits 45916 45931 +15
+ Misses 30309 30285 -24
- Partials 3875 3884 +9 see 12 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@mikery This is something we can integrate and one workflow is much better than two separate ones (they were historically two separate but there's no necessity to continue in that direction esp if GCR is deprecated. Especially considering the total build time this would be great, but we cannot however cut short the One thing that isn't that clear is that even though the |
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Signed-off-by: Pranay Valson <[email protected]>
Hi @noslav and team,
This PR modifies the Docker image workflow as follows:
The same workflow is used for pushes, pull requests and tags. A release is created if a
v*
tag is pushed. I opted to combine all of the functionality into a single workflow to keep things DRY, however you might prefer to optimise for simplicity over DRYness and have separate pipelines for branches/PRs/tags - if so please lmk and I can adjust the PR.Image names are determined automatically based on the action that triggered the workflow:
main
publishes imagebsp-geth:main
#n
publishes imagebsp-geth:pr-n
bsp-geth:1.2.3
,bsp-geth:1.2
bsp-geth:latest
is publishedUsing the GHA cache allows us to take full advantage of Docker layer caching which makes a significant difference in build times. This is most visible when publishing a tag - as we have already built the image for the tagged commit sha every layer of the image is a cache hit, bringing the release time down from 26 minutes to 3 minutes.
I saw some images being published to GHCR and some to GCR. Given that GCR is deprecated and will not allow creation of any new repos I opted to standardise on GHCR, but can change this if desired. "Old" Docker images for closed PRs and deleted branches will gradually accumulate in the Docker registry. I can submit a follow up PR which cleans up these images (leaving the tagged version images in place).
I have prepared similar PRs for other components with Docker images. If you are happy with this direction I can submit those PRs once any review comments on this one have been addressed.
ETA: In order for the build to succeed the GITHUB_TOKEN requires permissions to write packages.