diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 34b73cff0a..d58ae5a27c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -103,8 +103,8 @@ jobs: build-args: | APP_VERSION=${{ github.sha }} ADDITIONAL_PLUGS=${{ env.ADDITIONAL_PLUGS }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + cache-from: type=gha + cache-to: type=gha,mode=max - name: Create Sentry release uses: getsentry/action-release@v1 @@ -115,11 +115,6 @@ jobs: with: version: ${{ github.sha }} - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - notify-release: needs: build if: startsWith(github.event.ref, 'refs/tags/v') diff --git a/.github/workflows/reusable-test.yml b/.github/workflows/reusable-test.yml index ec0259c4a8..5a71f78ac3 100644 --- a/.github/workflows/reusable-test.yml +++ b/.github/workflows/reusable-test.yml @@ -38,8 +38,8 @@ jobs: with: load: true set: | - *.cache-from=type=local,src=/tmp/.buildx-cache - *.cache-to=type=local,dest=/tmp/.buildx-cache-new + *.cache-from=type=gha + *.cache-to=type=gha,mode=max files: docker-compose.yaml,docker-compose.local.yaml env: DOCKER_BUILD_SUMMARY: false @@ -73,18 +73,6 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: Move new cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - - name: Save Docker layers cache - if: ${{ inputs.event_name == 'push' || github.event_name == 'push' }} - uses: actions/cache/save@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ hashFiles('Pipfile.lock', 'docker/dev.Dockerfile') }} - - name: Upload db artifact if: ${{ inputs.event_name == 'push' || github.event_name == 'push' }} uses: actions/upload-artifact@v4 diff --git a/docker/prod.Dockerfile b/docker/prod.Dockerfile index 99f724066f..9ff225aa31 100644 --- a/docker/prod.Dockerfile +++ b/docker/prod.Dockerfile @@ -47,11 +47,11 @@ RUN pip install pipenv==2024.4.0 RUN python -m venv $APP_HOME/.venv COPY Pipfile Pipfile.lock $APP_HOME/ -RUN pipenv install --deploy --categories "packages" +RUN --mount=type=cache,target=/root/.cache/pip pipenv install --deploy --categories "packages" COPY plugs/ $APP_HOME/plugs/ COPY install_plugins.py plug_config.py $APP_HOME/ -RUN python3 $APP_HOME/install_plugins.py +RUN --mount=type=cache,target=/root/.cache/pip python3 $APP_HOME/install_plugins.py # --- FROM base AS runtime