diff --git a/.github/workflows/development_workflow.yml b/.github/workflows/development_workflow.yml index d1060fb4..c6c99308 100644 --- a/.github/workflows/development_workflow.yml +++ b/.github/workflows/development_workflow.yml @@ -70,6 +70,14 @@ jobs: - name: Build run: gradle clean installDist -x test + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-docker-staging-${{ matrix.platform }}-${{ hashFiles('Dockerfile') }} + restore-keys: | + ${{ runner.os }}-docker-staging-${{ matrix.platform }}- + - name: Build and push by digest id: build uses: docker/build-push-action@v6 @@ -78,8 +86,8 @@ 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=registry,ref=${{ env.REGISTRY_IMAGE }}:buildcache - cache-to: type=registry,ref=${{ env.REGISTRY_IMAGE }}:buildcache,mode=max + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new - name: Export digest run: | @@ -95,6 +103,11 @@ jobs: if-no-files-found: error retention-days: 1 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + merge: runs-on: ubuntu-latest needs: diff --git a/src/main/kotlin/fr/shikkanime/modules/Routing.kt b/src/main/kotlin/fr/shikkanime/modules/Routing.kt index 1b4e7f8d..6a0030c7 100644 --- a/src/main/kotlin/fr/shikkanime/modules/Routing.kt +++ b/src/main/kotlin/fr/shikkanime/modules/Routing.kt @@ -187,7 +187,7 @@ private suspend fun handleRequest( when (response.type) { ResponseType.MULTIPART -> handleMultipartResponse(call, response) ResponseType.TEMPLATE -> handleTemplateResponse(call, controller, replacedPath, response) - ResponseType.REDIRECT -> call.respondRedirect(response.data as String, true) + ResponseType.REDIRECT -> call.respondRedirect(response.data as String, !replacedPath.startsWith("/admin")) else -> call.respond(response.status, response.data ?: "") } } catch (e: Exception) {