forked from pvardanega/rpi-prometheus
-
Notifications
You must be signed in to change notification settings - Fork 6
/
create_manifest.sh
executable file
·13 lines (12 loc) · 938 Bytes
/
create_manifest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
set -e
DOWNLOAD_URL=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/prometheus/${IMAGE}/releases/latest | grep "browser_download_url" | grep "linux-${ARCH}" | cut -d\" -f4)
VERSION=v$(echo ${DOWNLOAD_URL}|sed 's/^.*\/download\/v\(.*\)\/.*$/\1/')
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
echo "Downloading manifest-tool"
wget https:/estesp/manifest-tool/releases/download/v0.7.0/manifest-tool-linux-amd64
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
./manifest-tool --version
echo "Pushing manifest ${REGISTRY}/${IMAGE}:latest"
./manifest-tool push from-args --platforms linux/arm,linux/arm64,linux/amd64 --template "${REGISTRY}/${IMAGE}:${VERSION}-ARCH" --target "${REGISTRY}/${IMAGE}:latest"
./manifest-tool push from-args --platforms linux/arm,linux/arm64,linux/amd64 --template "${REGISTRY}/${IMAGE}:${VERSION}-ARCH" --target "${REGISTRY}/${IMAGE}:${VERSION}"