Was recently looking for a quick way to update Kubernetes manifest files and came across this method which shows you how to do it both with
My solution used his first version which is using https://github.com/mikefarah/yq. Very awesome BTW.
For my script I ended up doing something like this:
cat scripts/update-docker-image.sh #!/bin/sh GIT_SHA=$(git rev-parse --short HEAD) yq w -i all-in-one.yml 'spec.template.spec.containers.image' \ "registry.gitlab.com/memestonks/api:$GIT_SHA"