From 4df22690f732d0dd792b7c3fe9df67c30d1c0fe5 Mon Sep 17 00:00:00 2001 From: Mohammad Mahdi Mohammadi Date: Sat, 4 Jan 2025 16:34:53 +0330 Subject: [PATCH] Maybe fix cache? --- .gitea/workflows/gitea-ci.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/gitea-ci.yml b/.gitea/workflows/gitea-ci.yml index a096298..b423f55 100755 --- a/.gitea/workflows/gitea-ci.yml +++ b/.gitea/workflows/gitea-ci.yml @@ -24,15 +24,12 @@ jobs: registry: git.mahdium.ir username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} - # - name: Cache Docker layers - # id: cache-layers - # uses: actions/cache@v3 - # with: - # path: /tmp/.buildx-cache - # key: ${{ runner.os }}-buildx-${{ github.ref }}-${{ github.sha }} - # restore-keys: | - # ${{ runner.os }}-buildx-${{ github.ref }}- - # ${{ runner.os }}-buildx- + + - name: Cache for Docker + uses: actions/cache@v4 + with: + path: image-cache + key: ${{ runner.os }}-image-cache-${{ github.ref }}-${{ github.sha }} - name: Extract Docker metadata id: meta @@ -45,6 +42,6 @@ jobs: context: . push: true tags: git.mahdium.ir/mahdium/cats-of-mastodon-telegram-bot${{gitea.sha}},git.mahdium.ir/mahdium/cats-of-mastodon-telegram-bot:latest - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=registry,ref=user/app:latest - cache-to: type=inline + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=image-cache + cache-to: type=local,dest=image-cache