Self hosted FLOSS fitness/workout, nutrition and weight tracker
First attempt at caching the image builds
Roland Geider1445d14ccbb7
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.ymlindex 68f21f9bd..f35069c0b 100644--- a/.github/workflows/docker.yml+++ b/.github/workflows/docker.yml@@ -71,6 +71,16 @@ jobs:- name: Set up Docker Buildxuses: docker/[email protected]+ with:+ install: true++ - name: Cache Docker layers+ uses: actions/cache@v3+ with:+ path: /tmp/.buildx-cache+ key: multi-buildx-${{ matrix.platform }}-${{ hashFiles('requirements*.txt') }}+ restore-keys: |+ multi-buildx-${{ matrix.platform }}- name: Login to Docker Hubuses: docker/[email protected]@@ -87,6 +97,10 @@ jobs:platforms: ${{ matrix.platform }}labels: ${{ steps.meta.outputs.labels }}outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true+ cache-from: type=local,src=/tmp/.buildx-cache+ # More: https://github.com/moby/buildkit#--export-cache-options+ # And: https://github.com/docker/buildx#--cache-tonametypetypekeyvalue+ cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new- name: Export digestrun: |@@ -102,6 +116,11 @@ jobs:if-no-files-found: errorretention-days: 1+ - name: Move cache+ run: |+ rm -rf /tmp/.buildx-cache+ mv /tmp/.buildx-cache-new /tmp/.buildx-cache+merge:runs-on: ubuntu-latestneeds: