From 2654b05f3b1b703c2a3d954ce728feea9d6b4634 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Wed, 8 Apr 2026 18:52:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20improve=20Swagger=20cachi?= =?UTF-8?q?ng=20with=20explicit=20restore/save=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-cd.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci-cd.yaml b/.gitea/workflows/ci-cd.yaml index ee74c48..83ed159 100644 --- a/.gitea/workflows/ci-cd.yaml +++ b/.gitea/workflows/ci-cd.yaml @@ -158,9 +158,9 @@ jobs: echo "DLC_DATABASE_NAME=dance_lessons_coach_bdd_test" >> $GITHUB_ENV echo "DLC_DATABASE_SSL_MODE=disable" >> $GITHUB_ENV - - name: Cache Swagger Docs - id: cache-swagger - uses: actions/cache@v3 + - name: Restore Swagger Docs Cache + id: cache-swagger-restore + uses: actions/cache/restore@v3 with: path: | pkg/server/docs/docs.go @@ -171,9 +171,19 @@ jobs: swagger-docs- - name: Generate Swagger Docs - if: steps.cache-swagger.outputs.cache-hit != 'true' + if: steps.cache-swagger-restore.outputs.cache-hit != 'true' run: go generate ./pkg/server + - name: Save Swagger Docs Cache + id: cache-swagger-save + uses: actions/cache/save@v3 + with: + path: | + pkg/server/docs/docs.go + pkg/server/docs/swagger.json + pkg/server/docs/swagger.yaml + key: ${{ steps.cache-swagger-restore.outputs.cache-primary-key }} + - name: Build all packages run: go build ./...