Skip to content

Commit d184d67

Browse files
committed
ci: Refactor Ubuntu flavor handling
Signed-off-by: Evan Wies <evan@neomantra.net>
1 parent d8ee77c commit d184d67

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

scripts/create-manifest.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/bin/bash
2-
set -e
3-
2+
# Creates and pushes manifests for flavors
3+
#
44
# Usage: ./create-manifest.sh <flavor> <registry_image> <mirror_image> <mirror_enable_bool>
55
# Example: ./create-manifest.sh alpine ghcr.io/owner/repo docker.io/owner/repo true
66

7+
set -e
8+
9+
710
FLAVOR="$1"
811
REGISTRY_IMAGE="$2"
912
MIRROR_IMAGE="$3"
@@ -25,9 +28,13 @@ fi
2528
ARCHS="amd64 arm64"
2629

2730
# Add s390x for Ubuntu flavors
28-
if [[ "$FLAVOR" == "bionic" || "$FLAVOR" == "focal" || "$FLAVOR" == "jammy" || "$FLAVOR" == "noble" ]]; then
29-
ARCHS="$ARCHS s390x"
30-
fi
31+
UBUNTU_FLAVORS=("bionic" "focal" "jammy" "noble")
32+
for ub_flavor in "${UBUNTU_FLAVORS[@]}"; do
33+
if [[ "$FLAVOR" == "$ub_flavor" ]]; then
34+
ARCHS="$ARCHS s390x"
35+
break
36+
fi
37+
done
3138

3239
# Fedora only supports amd64 in this setup
3340
if [[ "$FLAVOR" == "fedora" ]]; then

0 commit comments

Comments
 (0)