authelia/.buildkite/steps/aptdeploy.sh
Amir Zarrinkafsh b415770548
ci(buildkite): fix apt repo readme (#2245)
Image links in the apt repo README.md were broken as the file uploaded without the necessary modifications.
2021-08-05 16:58:08 +10:00

16 lines
716 B
Bash
Executable File

#!/usr/bin/env bash
for FILE in authelia_amd64.deb authelia_arm64.deb authelia_armhf.deb; do
mv ${FILE} ${FILE/authelia_/authelia_${BUILDKITE_TAG//v}-1_}
done
for ARCH in amd64 arm64 armhf; do
echo "--- :debian: :fedora: :ubuntu: Deploy APT repository package for architecture: ${ARCH}"
curl -s -H "Authorization: Bearer ${BALTO_TOKEN}" \
-F "distribution=all" \
-F "package=@authelia_${BUILDKITE_TAG//v}-1_${ARCH}.deb" \
--form-string "readme=$(cat README.md | sed -r 's/(\<img\ src\=\")(\.\/)/\1https:\/\/github.com\/authelia\/authelia\/raw\/master\//' | sed 's/\.\//https:\/\/github.com\/authelia\/authelia\/blob\/master\//g')" \
https://apt.authelia.com/stable/debian/upload/
echo -e "\n"
done