Conversation
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
| # because this stage builds only web assets, we can use any platform | ||
| FROM --platform=$BUILDPLATFORM node:18.20.5-alpine3.21 AS web |
There was a problem hiding this comment.
With this modification, we can now use node 20 or later. I want to discuss whether we should upgrade this to current LTS versions.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5578 +/- ##
=======================================
Coverage 26.33% 26.34%
=======================================
Files 467 467
Lines 50114 50114
=======================================
+ Hits 13198 13202 +4
+ Misses 35860 35857 -3
+ Partials 1056 1055 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| platforms: linux/amd64,linux/arm64 | ||
| # parameter to use inline cache. ref; https://docs.docker.com/build/ci/github-actions/cache/#inline-cache | ||
| cache-from: type=registry,ref=${{ env.REGISTRY }}/pipe-cd/${{ matrix.image }}:latest | ||
| cache-to: type=inline |
There was a problem hiding this comment.
[IMO] How about adding mode=max ?
It seems that we can cache all layer with it.
https://docs.docker.com/build/cache/backends/#cache-mode
It might be more efficient because our images are often built with mutl-stage build to download dependencies.
There was a problem hiding this comment.
Unfortunately, the inline cache doesn't support the max cache mode.
However, note that the inline cache exporter only supports min cache mode.
ref; https://docs.docker.com/build/ci/github-actions/cache/#inline-cache
We can consider using the GitHub cache, but it's experimental yet. So, I want to start by using inline cache and min cache mode.
What this PR does:
--platform=$BUILDPLATFORMflag to build web static assets in a docker multi-stage buildWhy we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: