CI: Enable BuildKit cache mounts for faster npm installs
All checks were successful
Build & Deploy / build (push) Successful in 1m40s
Build & Deploy / deploy (push) Successful in 6s
Build & Deploy / bump-version (push) Successful in 3s

- Add syntax directive for BuildKit cache-mount support
- Cache /root/.npm between builds (web + server npm install)
- Enable DOCKER_BUILDKIT=1 in CI build step
- Remove aggressive builder prune that killed layer cache after each build

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel 2026-03-11 11:50:34 +01:00
parent 38fb648e15
commit bf5b995d7c
2 changed files with 5 additions and 5 deletions

View file

@ -47,7 +47,7 @@ jobs:
- name: Build Docker image
run: |
docker build \
DOCKER_BUILDKIT=1 docker build \
--build-arg "VITE_BUILD_CHANNEL=${{ steps.vars.outputs.channel }}" \
--build-arg "VITE_APP_VERSION=${{ steps.vars.outputs.version }}" \
-t ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.vars.outputs.tag }} \
@ -75,7 +75,6 @@ jobs:
docker rmi "${{ env.REGISTRY }}/${{ env.IMAGE }}:latest" 2>/dev/null || true
fi
docker image prune -f 2>/dev/null || true
docker builder prune -f --keep-storage=4GB 2>/dev/null || true
deploy:
runs-on: ubuntu-latest
@ -125,7 +124,6 @@ jobs:
if: always()
run: |
docker image prune -f 2>/dev/null || true
docker builder prune -f --keep-storage=4GB 2>/dev/null || true
bump-version:
runs-on: ubuntu-latest