LDFLAGS is not passed to ko's build command even if it is defined in .ko.yaml
We (w/@dentrax) noticed an environment variable in .ko.yaml for passing ldflags to ko's binary. But in a workflow used for building ko's image, there is no environment variable to fill this value.
I think we can do something like the following:
LDFLAGS = "-s -w -X github.com/google/ko/pkg/commands.Version=$VERSION"
img=$(./ko build --bare --platform=all -t latest -t ${{ github.sha }} ./)
https://github.com/google/ko/pull/758 changed ko to not fail if the env is unset. A few of us found this to be a pretty annoying speedbump when just trying to build an image.
AFAIK if the env is set like you demonstrate above, it will be correctly passed to the build command.
Please let me know if you find this to not be the case.
This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Keep fresh with the 'lifecycle/frozen' label.