container-linux-config-transpiler icon indicating copy to clipboard operation
container-linux-config-transpiler copied to clipboard

ci: pass version to Docker image

Open tormath1 opened this issue 3 years ago • 4 comments

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.

tormath1 avatar Mar 09 '22 16:03 tormath1

What about this: https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches

jepio avatar Mar 09 '22 16:03 jepio

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 avatar Mar 09 '22 18:03 tormath1

@tormath1 were you ever able to figure it out? If not, might still be better to merge this than to not have versions :)

jepio avatar May 30 '22 11:05 jepio

@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.

tormath1 avatar May 30 '22 12:05 tormath1