Summary
The user is inquiring about how to include COMMIT_SHA and VERSION in Go build ldflags, noting that these values change with each commit. They express a desire to run the process only when necessary and suggest using secrets to pass this information, as changing a secret does not trigger a cache bust in Earthly. They acknowledge the suggestion and thank the responder.
brandon356
That's true. I'll use that method thank you.
vlad
It's kind of a hack, but you could pass this information as secrets. A secret being changed doesn't cause a cache bust in Earthly.
brandon356
Is there a way to add COMMIT_SHA and VERSION to a Go build ldflags? Normally this would change with every commit, so I'd like to only run if required