Skip to content

Commit

Permalink
Untag all images after building 1 version at the end.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolftimmermans committed Sep 30, 2024
1 parent b570c36 commit 5cbadb4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions create-latest
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#!/bin/bash

IMAGES=$(find . -maxdepth 1 -type d -not -name '.*' -not -name '_*' -exec basename {} \; | sort)
IMAGES_REV=$(echo "$IMAGES" | tac)
VERSIONS=$(wget https://alpinelinux.org/releases.json -q -O - | jq -r '(.release_branches | map(.rel_branch)) - ["edge"] | map(sub("v"; ""))[0:6][]')

echo Building images: $IMAGES
echo Building images: $IMAGES_REV
echo Building versions: $VERSIONS

IFS=$'\n'
for image in $IMAGES; do
for version in $VERSIONS; do
for version in $VERSIONS; do
for image in $IMAGES; do
./create "$image" "$version"
done

# Untag all images
for image in $IMAGES_REV; do
docker image rm "voormedia/${image}:${version}"
done
done

0 comments on commit 5cbadb4

Please sign in to comment.