refactored container image and gitea workflows
All checks were successful
/ build-docker-image (push) Successful in 1m2s

This commit is contained in:
2025-09-21 15:51:47 +01:00
parent 9fd2b7dd8b
commit 886cbb292f
9 changed files with 185 additions and 63 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/bash
source /app/scripts/loadenv
case "$MODE" in
BORG)
echo "executing borg cli"
borg "${@:1}" # Forward all arguments except $0 to another CLI so first argument (the name of this scripts don't passthrough)"
;;
SCRIPT)
# check if file exists
if [ ! -f /app/backup-scripts/backup ]; then
cat /app/README.md
exit 1
fi
echo "Executing: backup script with arguments: "\${@:1\"."
cd /app/backup-scripts && bash backup "${@:1}"
;;
SHELL)
echo "Executing: bash -c \"${@:1}\"."
bash -c "${@:1}"
;;
*)
echo "Unknown mode: $MODE."
echo "Valid modes are: BORG, SCRIPT, SHELL"
exit 1
;;
esac