trying to add gitea

This commit is contained in:
2025-09-22 10:12:07 -04:00
parent 95273be0b0
commit 7de99ef945
4 changed files with 9 additions and 5 deletions
+1
View File
@@ -97,6 +97,7 @@ jobs:
docker build \
$CACHE_ARGS \
--build-arg GIT_BRANCH=dev \
--build-arg BUILD_SOURCE=gitea \
--tag nfoguard:dev \
--tag nfoguard:dev-${{ github.sha }} \
--tag "$CACHE_IMAGE" \
+1
View File
@@ -100,6 +100,7 @@ jobs:
docker build \
$CACHE_ARGS \
--build-arg GIT_BRANCH=main \
--build-arg BUILD_SOURCE=gitea \
--tag nfoguard:latest \
--tag nfoguard:${{ github.sha }} \
--tag "$CACHE_IMAGE" \
+3 -2
View File
@@ -1,14 +1,15 @@
FROM python:3.11-slim
# Build argument for git branch
# Build argument for git branch and build source
ARG GIT_BRANCH=main
ARG BUILD_SOURCE=
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=utf-8 \
GIT_BRANCH=${GIT_BRANCH} \
GITEA_BUILD=true
BUILD_SOURCE=${BUILD_SOURCE}
# Install system dependencies including PostgreSQL client libraries
RUN apt-get update && apt-get install -y \
+4 -3
View File
@@ -1397,9 +1397,10 @@ 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
# Check for build source (only add -gitea for local Gitea builds)
build_source = os.environ.get("BUILD_SOURCE", "")
if build_source == "gitea":
if "gitea" not in version: # Don't double-add gitea suffix
version = f"{version}-gitea"
app = FastAPI(