build(docker): refactor Dockerfile to enable caching of node_modules (#1550)

* ci: revert actions/cache version change and install GNU tar

* ci: do not potentially destroy Docker cache while building preview images

* build(docker): refactor Dockerfile to cache node_modules

* ci: remove Next.js caching

* build(docker): don't break arm builds
This commit is contained in:
TheCatLady
2021-05-03 09:13:23 -04:00
committed by GitHub
parent f256a444c5
commit 2fc9835a6a
5 changed files with 16 additions and 44 deletions

View File

@@ -16,11 +16,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Next.js cache
uses: actions/cache@v2.1.0
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package.json') }}
- name: Install dependencies
env:
HUSKY_SKIP_INSTALL: 1
@@ -75,7 +70,7 @@ jobs:
ghcr.io/sct/overseerr:develop
ghcr.io/sct/overseerr:${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- # Temporary fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896