From 8942dca31da4f04eb8018c65d5826b1bab000db2 Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 29 Apr 2022 09:48:00 -0500 Subject: [PATCH] Update docker-build workflow --- .github/workflows/docker-build.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 10c8f719..4c08d612 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -11,6 +11,8 @@ on: paths: - client/** - server/** + - index.js + - package.json release: types: [published, edited] # Allows you to run workflow manually from Actions tab @@ -29,16 +31,23 @@ jobs: id: meta uses: docker/metadata-action@v3 with: - images: advplyr/audiobookshelf,ghcr.io/${{ github.repository_owner }}/audiobookshelf + images: advplyr/audiobookshelf-dev,ghcr.io/${{ github.repository_owner }}/audiobookshelf-dev tags: | type=edge,branch=master type=semver,pattern={{version}} - - name: Setup QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - name: Login to Dockerhub uses: docker/login-action@v1 @@ -60,3 +69,10 @@ jobs: context: . platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache