Skip to content

Commit

Permalink
tag latest when updating
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Dec 11, 2023
1 parent 432d2e3 commit 77c42f8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/pull_calaos_image
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ image_url=$(cat "$url")
echo " > Pulling image $image_url"
podman pull "$image_url"

# get image name
image_name=$(echo "$image_url" | cut -d ':' -f 1)

# get version
image_version=$(echo "$image_url" | cut -d ':' -f 2)

#get sha of image from podman
sha=$(podman images -a | grep "$image_name" | grep "$image_version" | awk -F ' ' '{ print $3 }')

# tag latest
podman image tag "$sha" "$image_name":latest

# Clean old remaining container images
echo " > Cleaning old images"
podman image prune -f
Expand Down

0 comments on commit 77c42f8

Please sign in to comment.