ci: pass version to Docker image
Latest release gave the following:
podman run --rm ghcr.io/flatcar-linux/ct -version
ct
Instead of:
podman run --rm ct -version
ct v0.9.3
I think in the CI, we can't rely on Git to get the tag:
#10 2.710 fatal: No annotated tags can describe '3d9d6367d07de0323055e7d1536040e03b43c963'.
#10 2.710 However, there were unannotated tags: try --tags.
#10 2.713 fatal: No annotated tags can describe '3d9d6367d07de0323055e7d1536040e03b43c963'.
#10 2.713 However, there were unannotated tags: try --tags.
#10 2.716 fatal: No annotated tags can describe '3d9d6367d07de0323055e7d1536040e03b43c963'.
#10 2.716 However, there were unannotated tags: try --tags.
#10 2.719 fatal: No annotated tags can describe '3d9d6367d07de0323055e7d1536040e03b43c963'.
#10 2.719 However, there were unannotated tags: try --tags.
#10 2.801 fatal: No annotated tags can describe '3d9d6367d07de0323055e7d1536040e03b43c963'.
#10 2.801 However, there were unannotated tags: try --tags.
So let's try to explicitly pass the tag.
What about this: https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
What about this: https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
@jepio thanks - it almost works. On my fork, I keep hitting some issues:
podman run --rm ghcr.io/tormath1/ct:v0.9.4 -version
ct v0.9.3-1
podman run --rm ghcr.io/tormath1/ct:v0.9.5 -version
ct v0.9.4-1-g9d82171
I'll have a look tomorrow.
@tormath1 were you ever able to figure it out? If not, might still be better to merge this than to not have versions :)
@jepio thanks for the heads-up. I gave another try, still hitting the inconsistency but the change looks good to me according to the documentation. Let's merge this and iterate on it - I'm guessing I got some inconsistency because I can't really be iso-prod and using a fork might messing up the version injection.