From bf7f731002625ebaa704e372636d11f486b5ba4e Mon Sep 17 00:00:00 2001 From: Alie Date: Thu, 22 Feb 2024 17:32:49 +0100 Subject: [PATCH] Revert "disable cache" This reverts commit 35ac4f9aa8b661747af51569e873398f3196f5d5. --- .gitea/workflows/01_test.yaml | 15 ++++++++++++++- .gitea/workflows/02_build.yaml | 14 +++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/01_test.yaml b/.gitea/workflows/01_test.yaml index 49d8729..5ed0147 100644 --- a/.gitea/workflows/01_test.yaml +++ b/.gitea/workflows/01_test.yaml @@ -18,5 +18,18 @@ jobs: uses: actions/checkout@v3 - name: Get access token from secret run: echo "${{ secrets.MASTODON_SECRET }}" > mastodon-data.toml + - name: Restore cached target + uses: actions/cache/restore@v3 + with: + path: | + target/ + key: ${{ runner.os }}-target + - run: ls - name: Run tests on docker - run: docker compose down -v && docker compose run bot t \ No newline at end of file + run: docker compose down -v && docker compose run bot t + - name: Save target + uses: actions/cache/save@v3 + with: + path: | + target/ + key: ${{ steps.cache-primes-restore.outputs.cache-primary-key }} \ No newline at end of file diff --git a/.gitea/workflows/02_build.yaml b/.gitea/workflows/02_build.yaml index 3bf6b63..3723dd7 100644 --- a/.gitea/workflows/02_build.yaml +++ b/.gitea/workflows/02_build.yaml @@ -42,6 +42,12 @@ jobs: registry: git.fai.st username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASS }} + - name: Restore cached target + uses: actions/cache/restore@v3 + with: + path: | + target/ + key: ${{ runner.os }}-target - name: Build and push uses: docker/build-push-action@v4 with: @@ -49,4 +55,10 @@ jobs: context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + - name: Save target + uses: actions/cache/save@v3 + with: + path: | + target/ + key: ${{ steps.cache-primes-restore.outputs.cache-primary-key }} \ No newline at end of file