From 95273be0b062fd6c97b4a306c9b90af463a94cc6 Mon Sep 17 00:00:00 2001 From: SBCrumb Date: Mon, 22 Sep 2025 10:07:39 -0400 Subject: [PATCH] update flow --- Dockerfile | 3 ++- nfoguard.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b48c511..e49defa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ ARG GIT_BRANCH=main ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PYTHONIOENCODING=utf-8 \ - GIT_BRANCH=${GIT_BRANCH} + GIT_BRANCH=${GIT_BRANCH} \ + GITEA_BUILD=true # Install system dependencies including PostgreSQL client libraries RUN apt-get update && apt-get install -y \ diff --git a/nfoguard.py b/nfoguard.py index 369228e..83040ce 100644 --- a/nfoguard.py +++ b/nfoguard.py @@ -1397,6 +1397,11 @@ except Exception: # If git detection fails, that's fine - use base version pass +# Check for Gitea build environment variable +if os.environ.get("GITEA_BUILD") == "true": + if "-" not in version: # Don't double-add suffixes + version = f"{version}-gitea" + app = FastAPI( title="NFOGuard", description="Webhook server for preserving media import dates",