From edb83e0fadda4e40ca0f29e7525c7118ff94bb5f Mon Sep 17 00:00:00 2001 From: EremeevRA Date: Thu, 2 Apr 2026 18:15:01 +0300 Subject: [PATCH] cache test --- .gitea/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 49a820c..cd1c7dd 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -19,6 +19,14 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.11' + + - name: Кэширование pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('api/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Установка зависимостей run: | @@ -73,14 +81,23 @@ jobs: username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ hashFiles('api/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Build Docker image - id: build uses: docker/build-push-action@v5 with: context: . push: false load: true tags: fastapi-app:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache,mode=max - name: Stop and remove old container run: |