-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsync.sh
More file actions
executable file
·36 lines (31 loc) · 1.14 KB
/
sync.sh
File metadata and controls
executable file
·36 lines (31 loc) · 1.14 KB
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
31
32
33
34
35
36
#!/usr/bin/env sh
set -e
git tag > local.list
tags=$(curl -s "https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-runner/releases?per_page=50" | jq -r '.[].tag_name' | grep -vf local.list)
archs="x86_64 arm64 arm s390x ppc64le"
flavors="alpine3.21 alpine-latest ubuntu"
for tag in $tags
do
echo "Syncing tag $tag..."
for flavor in $flavors
do
for arch in $archs
do
arch_target=$arch
if [ $arch_target = "x86_64" ]; then
arch_target="amd64"
fi
skopeo copy --override-arch $arch_target --dest-creds="$:$GITHUB_TOKEN" \
docker://registry.gitlab.com/gitlab-org/gitlab-runner/gitlab-runner-helper:$flavor-$arch-$tag \
docker://ghcr.io/loft-orbital/gitlab-runner-helper:$flavor-$arch_target-$tag
done
echo "Reconstructing manifest for $tag..."
manifest-tool push from-args \
--platforms linux/amd64,linux/arm64,linux/arm,linux/s390x,linux/ppc64le \
--template ghcr.io/loft-orbital/gitlab-runner-helper:$flavor-ARCH-$tag \
--target ghcr.io/loft-orbital/gitlab-runner-helper:$flavor-$tag
done
echo "Creating release $tag..."
gh release create $tag --generate-notes
echo "Done."
done