From fd3d8f74840e4f890a1cf8eef29dfae5fff9933a Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Sat, 22 Apr 2023 20:33:26 +0200 Subject: [PATCH] chore(build): try to fix caching --- .github/workflows/backend_build.yml | 1 + .github/workflows/deploy.yml | 21 ++++++++++----------- .github/workflows/frontend_build.yml | 14 ++++++++++---- backend/src/main/resources/application.yml | 2 +- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/backend_build.yml b/.github/workflows/backend_build.yml index 49e3eae6..b1b62716 100644 --- a/.github/workflows/backend_build.yml +++ b/.github/workflows/backend_build.yml @@ -35,6 +35,7 @@ jobs: with: java-version: 17 distribution: temurin + cache: 'maven' - name: Cache Maven Deps uses: actions/cache@v3 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dff76a79..19d2ab17 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,6 +44,7 @@ jobs: with: java-version: 17 distribution: temurin + cache: 'maven' - name: Set up Node uses: actions/setup-node@v3 @@ -53,23 +54,21 @@ jobs: - name: Set up pnpm uses: pnpm/action-setup@v2 with: - version: 7 + version: 8 - - name: Cache Maven Deps - uses: actions/cache@v3 - with: - path: $GITHUB_WORKSPACE/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - name: Cache pnpm uses: actions/cache@v3 with: - path: "~/.pnpm-store" - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm- + ${{ runner.os }}-pnpm-store- - name: Build backend working-directory: backend diff --git a/.github/workflows/frontend_build.yml b/.github/workflows/frontend_build.yml index c1b842b2..b203037e 100644 --- a/.github/workflows/frontend_build.yml +++ b/.github/workflows/frontend_build.yml @@ -30,15 +30,21 @@ jobs: - name: Set up pnpm uses: pnpm/action-setup@v2 with: - version: 7 + version: 8 + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - name: Cache Pnpm uses: actions/cache@v3 with: - path: "~/.pnpm-store" - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}-pnpm- + ${{ runner.os }}-pnpm-store- - name: Install frontend deps env: diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index f35e5cb1..921297bc 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -198,7 +198,7 @@ hangar: size: 256 mail: - from: noreply@mail.papermc.dev + from: Hangar user: dum pass: dum host: localhost