diff --git a/.github/fiware/image-clone.sh b/.github/fiware/image-clone.sh index d9dc7f9..83f3e8d 100755 --- a/.github/fiware/image-clone.sh +++ b/.github/fiware/image-clone.sh @@ -23,8 +23,7 @@ function clone { } for i in "$@" ; do - if [[ $i == "docker" ]]; then - + if [[ $i == "docker" ]]; then clone "$SOURCE" "$VERSION" "$DOCKER_TARGET" true fi if [[ $i == "quay" ]]; then @@ -32,3 +31,10 @@ for i in "$@" ; do fi echo "" done + + +for i in "$@" ; do + if [[ $i == "clean" ]]; then + docker rmi -f $(docker images -a -q) | true + fi +done