Skip to content

Commit 1104f67

Browse files
committed
merge after all builds
1 parent 6cfe497 commit 1104f67

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

scripts/merge.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
set -euxo pipefail
3+
4+
if [ "$#" -eq 0 ]; then
5+
echo "Error: At least one parameter (label) must be provided."
6+
exit 1
7+
fi
8+
9+
LABELS=()
10+
for LABEL in "$@"; do
11+
LABELS+=("${LABEL}")
12+
done
13+
14+
# Define target architectures
15+
ARCHITECTURES=("amd64", "arm64")
16+
17+
# Create and push the merged multiarch manifest for each tag; each tag combines all architecture-specific tags into one tag
18+
for LABEL in "${LABELS[@]}"; do
19+
echo "Merging all architectures (${ARCHITECTURES[@]}) into single tag: ${LABEL}"
20+
21+
MANIFEST_MERGE_CALL="docker buildx imagetools create -t ghcr.io/eclipse-score/devcontainer:${LABEL}"
22+
23+
for ARCH in "${ARCHITECTURES[@]}"; do
24+
MANIFEST_MERGE_CALL+=" ghcr.io/eclipse-score/devcontainer:${LABEL}-${ARCH}"
25+
done
26+
27+
eval "$MANIFEST_MERGE_CALL"
28+
done

0 commit comments

Comments
 (0)