add docker setup for hosting the repo

This commit is contained in:
2025-10-09 21:02:20 +02:00
parent 7480ed630d
commit 19aaa4aeb0
5 changed files with 57 additions and 22 deletions
+25
View File
@@ -0,0 +1,25 @@
#! /bin/bash
if [ ! -d "/repo/.git" ]; then
echo "Cloning repository..."
git clone --branch "$BRANCH" "$REPO_URL" "/repo"
fi
while true; do
echo "Running repo update..."
cd "/repo" || exit
git fetch origin
LOCAL=$(git rev-parse HEAD)
REMOTE=$(git rev-parse origin/binaries)
if [ "$LOCAL" != "$REMOTE" ]; then
echo "Updating repo..."
git reset --hard origin/binaries
echo "Update complete."
else
echo "Nothing to do."
fi
sleep 600 # check every 10 min
done