From bd30023d629d92dacf805a6318b4380c42f1e26d Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Fri, 20 Jan 2023 09:11:38 +0100 Subject: [PATCH] Cache the maven wrapper JAR for Maven builds (#16092) Closes #16091 --- .github/actions/maven-cache/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/actions/maven-cache/action.yml b/.github/actions/maven-cache/action.yml index 7d2c56f8e4..09fe08023b 100644 --- a/.github/actions/maven-cache/action.yml +++ b/.github/actions/maven-cache/action.yml @@ -26,3 +26,12 @@ runs: ls ~/.m2/repository/org/keycloak exit 1 fi + + - name: Cache Maven Wrapper + uses: actions/cache@v3 + with: + path: .mvn/wrapper/maven-wrapper.jar + key: ${{ runner.os }}-maven-wrapper-${{ hashFiles('**/maven-wrapper.properties') }} + # use a previously cached JAR file as something else besides the version could have changed in the file + restore-keys: | + ${{ runner.os }}-maven-wrapper- \ No newline at end of file