mirror of
https://github.com/GNS3/gns3-registry.git
synced 2024-12-19 21:07:55 +00:00
Docker build: better get_image_version()
This commit is contained in:
parent
49bbb3985c
commit
3d842d2ff3
5
.github/workflows/build-docker-images.yml
vendored
5
.github/workflows/build-docker-images.yml
vendored
@ -96,9 +96,10 @@ jobs:
|
||||
|
||||
# get image version
|
||||
get_image_version() {
|
||||
local object
|
||||
object='config.Labels."org.opencontainers.image.version"'
|
||||
docker buildx imagetools inspect --format '{{json .Image}}' "$1" | \
|
||||
sed -n 's/^ *"org\.opencontainers\.image\.version": *"\([^"]*\).*/\1/p' | \
|
||||
head -n 1
|
||||
jq -r ".$object // .\"linux/amd64\".$object // empty"
|
||||
}
|
||||
|
||||
# special treatment for kalilinux: rebuild when image version changes
|
||||
|
Loading…
Reference in New Issue
Block a user