This commit is contained in:
@@ -16,6 +16,13 @@ jobs:
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /root/.cache/pip
|
||||
key: pip-{{ hashFiles('requirements*.txt') }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
@@ -30,7 +37,10 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
build-contexts: pip_cache=${{steps.vars.outputs.pip-dir}}
|
||||
tags: gitea.tryton.geeraert.eu/pi-ux-ce/django-python:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: drop the pod to force pulling the new image
|
||||
uses: actions-hub/kubectl@master
|
||||
env:
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ WORKDIR /code/
|
||||
COPY requirements.txt ./
|
||||
COPY django_code ./
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/pip pip install --upgrade pip
|
||||
RUN --mount=type=cache,target=/root/.cache/pip pip install --no-cache-dir -r requirements.txt
|
||||
RUN --mount=type=cache,target=/root/.cache/pip,from=pip_cache pip install --upgrade pip
|
||||
RUN --mount=type=cache,target=/root/.cache/pip,from=pip_cache pip install --no-cache-dir -r requirements.txt
|
||||
COPY . .
|
||||
RUN python django_code/manage.py migrate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user