From 37952b714e45d81417dbb29ffa83029cc236ed0a Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Mon, 27 May 2024 20:26:59 +0800 Subject: [PATCH] attempt to use buildx cache --- .gitea/workflows/build.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index dbdc7f0..96e1df7 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -3,7 +3,7 @@ on: push: branches: [ master ] jobs: - docker: + "Build docker images": runs-on: woryzen steps: - @@ -27,8 +27,8 @@ jobs: platforms: linux/amd64 push: true tags: gitea.woggioni.net/woggioni/jupyter-python:latest - # cache-from: type=registry,ref=gitea.woggioni.net/woggioni/jupyter-python:buildcache - # cache-to: type=registry,ref=gitea.woggioni.net/woggioni/jupyter-python:buildcache,mode=max + cache-from: type=local,src=/var/cache/buildx + cache-to: type=local,dest=/var/cache/buildx,mode=max - name: Build and push jupyter-ganymede image uses: docker/build-push-action@v5.3.0 @@ -37,3 +37,12 @@ jobs: platforms: linux/amd64 push: true tags: gitea.woggioni.net/woggioni/jupyter-ganymede:latest + cache-from: type=local,src=/var/cache/buildx + cache-to: type=local,dest=/var/cache/buildx,mode=max + - name: Cache Buildx cache + uses: actions/cache@v4.0.2 + with: + path: /var/cache/buildx + key: ${{ runner.os }}-buildx-${{ gitea.sha }} + restore-keys: | + ${{ runner.os }}-buildx- \ No newline at end of file