try another build method
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s

This commit is contained in:
2026-08-03 14:33:25 +01:00
parent 2e5e3b0a26
commit d38cea53f8
3 changed files with 10 additions and 13 deletions
+7 -7
View File
@@ -15,19 +15,19 @@ RUN apt-get update && \
apt-get install -y git nano && \
rm -rf /var/lib/apt/lists/*
# CACHE_BUST forces this layer (and everything after it) to re-run on every
# build, otherwise Docker reuses a cached clone from a previous build and the
# image silently keeps stale code.
ARG CACHE_BUST=1
RUN echo "cache bust: ${CACHE_BUST}" && \
git clone --depth 1 -b testing https://gitea.tryton.geeraert.eu/pi-ux-ce/Django_kube.git .
# Copy only the requirements file first (Changes infrequently)
COPY requirements.txt ./
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade pip
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade pip
RUN pip list --cache-dir=/opt/hostedtoolcache/pip --outdated
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade wheel
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade setuptools
RUN pip install --cache-dir=/opt/hostedtoolcache/pip -r requirements.txt
# Copy the rest of your application code (Changes frequently, invalidates subsequent cache)
COPY . ./
COPY infra/testing/entrypoint.sh /code/entrypoint.sh
RUN chmod +x /code/entrypoint.sh
+2 -6
View File
@@ -1,11 +1,7 @@
#!/bin/bash
set -e
cd Django_kube
#another methid but needs to rm -rf before
#git clone --depth 1 -b main https://gitea.tryton.geeraert.eu/pi-ux-ce/Django_kube.git
git stash
git pull
git pull origin testing
pip install -r requirements.txt