Cache layers when building image in GHA#1687
Conversation
This improves the build process by caching layers in GitHub Actions, which speeds up build times and improves resilience to image repository outages. This GHA workflow is only used during CI, to ensure an image can build without errors. Not the final image used in deployments.
|
|
🎉 A review copy of this PR has been deployed! It is made of up two components Important Not all of the functionality of forms-runner is present in review apps. You should use the full dev environment to test the functionality which is disabled here. It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
Since we started using docker buildx in CI [[1]], we've been getting
check annotations with linting warnings for the Dockerfile in all PRs
(even ones which don't change the Dockerfile), which is very annoying.
This commit fixes all the warnings:
- UndefinedVar
- NODE_ENV needs to be declared as a build argument
- RAILS_ENV needs to be declared as a build argument in all
independent stages
- There is unlikely to be a need to set REDIS_URL to anything
specific, always set it to the same dummy value
[1]: #1687
Since we started using docker buildx in CI [[1]], we've been getting
check annotations with linting warnings for the Dockerfile in all PRs
(even ones which don't change the Dockerfile), which is very annoying.
This commit fixes all the warnings:
- UndefinedVar
- NODE_ENV needs to be declared as a build argument
- RAILS_ENV needs to be declared as a build argument in all
independent stages
- There is unlikely to be a need to set REDIS_URL to anything
specific, always set it to the same dummy value
[1]: #1687
Since we started using docker buildx in CI [[1]], we've been getting
check annotations with linting warnings for the Dockerfile in all PRs
(even ones which don't change the Dockerfile), which is very annoying.
This commit fixes all the warnings:
- UndefinedVar
- NODE_ENV needs to be declared as a build argument
- RAILS_ENV needs to be declared as a build argument in all
independent stages
- There is unlikely to be a need to set REDIS_URL to anything
specific, always set it to the same dummy value
[1]: #1687



This improves the build process by caching layers in GitHub Actions, which speeds up build times and improves resilience to image repository outages.
This GHA workflow is only used during CI, to ensure an image can build without errors. Not the final image used in deployments.