authelia/.buildkite/steps/aptdeploy.sh
Amir Zarrinkafsh 711b5ff0db
feat: publish and deploy to apt.authelia.com (#2148)
This automates the process of publishing our `*.deb` files for stable Authelia releases to apt.authelia.com.
2021-07-05 12:49:48 +10:00

15 lines
692 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 "readme=<$(echo README.md | sed -r 's/(\<img\ src\=\")(\.\/)/\1https:\/\/github.com\/authelia\/authelia\/raw\/master\//' | sed 's/\.\//https:\/\/github.com\/authelia\/authelia\/blob\/master\//g')" \
-F "package=@authelia_${BUILDKITE_TAG//v}-1_${ARCH}.deb" \
https://apt.authelia.com/stable/debian/upload/
done