refactor(deploy): replace Makefile with build-push-action
#3733
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.
With the Makefile radically simplified by #3260, the work that it does can easily be done by a
docker/build-push-action
step in the deployment workflow. Beyond this simplicity, the use of the action makes build caching available and will trim a decent amount of time from the build job.In this change, the method of referring to the image is changed: instead of a tag (e.g.
c29346b-prod
) the digest of the uploaded image is used. The digest is an unambiguous and immutable reference to an image, where a tag can be changed. For this reason, it's recommended for deployments (see https://cloud.google.com/kubernetes-engine/docs/concepts/about-container-images).Also in this change is the use of
docker/metadata-action
. It is configured to produce the same tags as before (c29346b-prod
), but it is capable of doing much more. A future direction is to replace thesha
-based tag with either a build date or build id ($RUN_ID-$RUN_ATTEMPT
). For now we only introducelabels
, which attaches creation date and the full sha SHA to the built images.