feat: apko publish: write all published tags to a file and publish the tags
joemiller opened this issue · comments
/The existing --stage-tags tags.txt
flag for apko publish
will write all tags, including tags generated via --package-version-tag
and --package-version-tag-stem
to a file but it disables publishing those tags.
It would be helpful to have a version of this flag that wrote the published tags as well as published them. This would allow scripts/tooling that want to use apko publish
to handle publishing and also have a simple way to discover and report on all of the published tags.
It's possible to work around this using something like crane
, eg:
digest=$(apko publish --package-version-tag go-1.20 --stage-tags tags.txt ./apko.yaml registry/go:latest)
for i in $(cat tags.txt); do
crane tag "$digest" $i # actually i think the tags.txt contains fully qualified image name so you'd need to strip off the `:tag` from the end before passing $i into `crane`
done
But it would be ideal to not have to do this.
I would be happy to send a PR for this if it's something the project would likely accept? What would an appropriate flag name be?