Retire review deploy and add live Actions
Deploy live / test (push) Successful in 23s
Deploy live / deploy (push) Failing after 1s

This commit is contained in:
2026-08-11 08:03:49 +02:00
parent c65b5c8406
commit 1ed5964554
19 changed files with 115 additions and 478 deletions
+10 -13
View File
@@ -2,7 +2,7 @@
set -eu
if [ "$(id -u)" -ne 0 ]; then
echo "Run as root: sudo sh /opt/importarr/repo-upgrade.sh vMAJOR.MINOR.PATCH" >&2
echo "Run as root: sudo sh /opt/importarr/repo-upgrade.sh" >&2
exit 1
fi
@@ -16,10 +16,8 @@ PREFIX=${IMPORTARR_PREFIX:-/opt/importarr}
REPO_DIR=${IMPORTARR_REPO_DIR:-$PREFIX/repo}
SERVICE=${IMPORTARR_SERVICE:-importarr.service}
VENV=${IMPORTARR_VENV:-$PREFIX/venv}
RELEASE_TAG=${1:-}
if [ -z "$RELEASE_TAG" ]; then
echo "Usage: $0 vMAJOR.MINOR.PATCH" >&2
if [ "$#" -ne 0 ]; then
echo "Usage: $0" >&2
exit 2
fi
@@ -42,20 +40,19 @@ if [ -n "$(git status --porcelain)" ]; then
exit 1
fi
git fetch --prune --tags origin
if ! git rev-parse --verify --quiet "refs/tags/$RELEASE_TAG" >/dev/null; then
echo "Release tag not found: $RELEASE_TAG" >&2
exit 1
fi
git checkout --detach "$RELEASE_TAG"
test "$(git describe --tags --exact-match HEAD)" = "$RELEASE_TAG"
git fetch --prune origin main
git checkout -B main origin/main
test "$(git rev-parse HEAD)" = "$(git rev-parse origin/main)"
"$VENV/bin/pip" install --upgrade --force-reinstall --no-cache-dir "$REPO_DIR"
if [ -f "$ENV_FILE" ]; then
sed -i '/^[[:space:]]*IMPORTARR_UPDATE_COMMAND=/d' "$ENV_FILE"
fi
install -m 0644 "$REPO_DIR/deploy/importarr.service" /etc/systemd/system/importarr.service
install -m 0755 "$REPO_DIR/deploy/repo-upgrade.sh" "$PREFIX/repo-upgrade.sh"
systemctl daemon-reload
GIT_SHA="$(git rev-parse --short=12 HEAD 2>/dev/null || printf development)"
BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
VERSION="$RELEASE_TAG"
VERSION="$(git rev-parse --short=12 HEAD)"
BUILD_ENV_TMP="$PREFIX/build.env.tmp.$$"
trap 'rm -f "$BUILD_ENV_TMP"' EXIT HUP INT TERM
cat > "$BUILD_ENV_TMP" <<EOF