diff --git a/.forgejo/workflows/build-client.yml b/.forgejo/workflows/build-client.yml index 530779e..e31f518 100644 --- a/.forgejo/workflows/build-client.yml +++ b/.forgejo/workflows/build-client.yml @@ -24,11 +24,13 @@ jobs: run: bash scripts/webhook.sh "**(Client)** Build Action Started" - name: Initialize Gradle uses: https://github.com/gradle/actions/setup-gradle@v3 - - name: Get ForgeGradle cache - continue-on-error: true - run: | - mv ~/.gradle/caches/baseband/fg_cache Client/build/fg_cache - ln ../../Client/build/fg_cache Loader/build/fg_cache + - name: Initialize ForgeGradle cache + id: cache-fg + uses: actions/cache@v4 + with: + path: | + Client/build/fg_cache + Loader/build/fg_cache - name: Build run: | bash scripts/gen_hash.sh @@ -79,10 +81,4 @@ jobs: - name: Notify Action Completion if: always() run: bash scripts/webhook.sh "**(Client)** Build Action Completed <@&1250456258629341284>" - - name: Put ForgeGradle cache - if: always() - run: | - rm -rf ~/.gradle/caches/baseband/fg_cache - mkdir -p ~/.gradle/caches/baseband/ - mv Client/build/fg_cache ~/.gradle/caches/baseband/ diff --git a/.forgejo/workflows/build-loader.yml b/.forgejo/workflows/build-loader.yml index 04f3fa1..e4c26ba 100644 --- a/.forgejo/workflows/build-loader.yml +++ b/.forgejo/workflows/build-loader.yml @@ -26,12 +26,13 @@ jobs: run: bash scripts/webhook.sh "**(Loader)** Build Action Started at" - name: Initialize Gradle uses: https://github.com/gradle/actions/setup-gradle@v3 - - name: Get ForgeGradle cache - continue-on-error: true - run: | - mkdir Client/build Loader/build - mv ~/.gradle/caches/baseband/fg_cache Client/build/ - ln ../../Client/build/fg_cache Loader/build/fg_cache + - name: Initialize ForgeGradle cache + id: cache-fg + uses: actions/cache@v4 + with: + path: | + Client/build/fg_cache + Loader/build/fg_cache - name: Build run: | bash scripts/gen_hash.sh @@ -56,9 +57,3 @@ jobs: - name: Notify Action Completion if: always() run: bash scripts/webhook.sh "**(Loader)** Build Action Completed <@&1250456258629341284> - - name: Put ForgeGradle cache - if: always() - run: | - rm -rf ~/.gradle/caches/baseband/fg_cache - mkdir -p ~/.gradle/caches/baseband/ - mv Client/build/fg_cache ~/.gradle/caches/baseband/