Skip to content
Snippets Groups Projects

CI: add multiarch build / tagging

Closed Alexander Wellbrock requested to merge feature/multiarch into main
Compare and
12 files
+ 415
19
Compare changes
  • Side-by-side
  • Inline

Files

 
#!/bin/bash
 
 
set -o pipefail
 
set -u
 
set -e
 
 
printUsage() {
 
echo "
 
Shivering-Isles push tool
 
 
This tool will push all tagged versions of a container image upstream
 
 
Usage of $0:
 
$0 <IMAGE REFERENCE>
 
 
Example:
 
$0 registry.example.com/example/app:1 registry.example.com/example/app:1.2
 
"
 
exit 1
 
}
 
 
if [ "$1" = "--help" ]; then
 
printUsage
 
fi
 
 
DRY=0
 
 
for i in "$@"
 
do
 
case $i in
 
--dry)
 
DRY=1
 
shift
 
;;
 
-h|--help)
 
printUsage
 
shift
 
;;
 
*)
 
# further/unknown options
 
;;
 
esac
 
done
 
 
TAGS_TO_PUSH=("$@")
 
 
if [ "$DRY" = "1" ]; then
 
echo "${TAGS_TO_PUSH[@]}"
 
else
 
for IMAGE_REFERENCE in "${TAGS_TO_PUSH[@]}"
 
do
 
podman manifest push --all --format v2s2 "$IMAGE_REFERENCE" "docker://$IMAGE_REFERENCE"
 
done
 
fi
Loading