-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-manifests.sh
More file actions
executable file
·30 lines (23 loc) · 930 Bytes
/
build-manifests.sh
File metadata and controls
executable file
·30 lines (23 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
branch=${1:-main}
manifests=$(cat images.txt)
for manifest in $manifests ; do
aarch64Image=$(echo "${manifest}" | sed "s/:[^:]*$/:${branch}-aarch64/")
x864Image=$(echo "${manifest}" | sed "s/:[^:]*$/:${branch}-x86_64/")
echo "Pulling ${aarch64Image}"
podman pull --arch arm64 ${aarch64Image}
echo "Pulling ${x864Image}"
podman pull --arch x86_64 ${x864Image}
if [[ "${branch}" == "main" ]] ; then
echo "Creating the manifest ${manifest}"
podman rmi -f ${manifest} || true
podman manifest create ${manifest} ${aarch64Image} ${x864Image}
podman manifest push --all ${manifest}
else
stableManifest=$(echo "${manifest}" | sed "s/:[^:]*$/:${branch}/")
echo "Creating the manifest ${stableManifest}"
podman rmi -f ${stableManifest} || true
podman manifest create ${stableManifest} ${aarch64Image} ${x864Image}
podman manifest push --all ${stableManifest}
fi
done