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