update the workflow test
Some checks failed
Test Gitea Secrets / deploy-to-modal (push) Failing after 16s

This commit is contained in:
DatTT127
2026-07-16 23:41:57 +07:00
parent 1e6953d5a1
commit 7b9db01f2a
2 changed files with 31 additions and 6 deletions

View File

@@ -0,0 +1,30 @@
# --- Stage 1: Builder ---
FROM python:3.12-slim AS builder
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies into a local folder
RUN pip install --user modal
# --- Stage 2: Runner ---
FROM python:3.12-slim
# Install only the runtime dependencies needed for Gitea Actions
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy the installed packages from the builder stage
COPY --from=builder /root/.local /root/.local
# Ensure the local bin is in the PATH
ENV PATH=/root/.local/bin:$PATH
# WORKDIR /workspace
CMD [ "bash" ]