Monday, February 14, 2022

Code to cache the maven dependencies while running the github actions

jobs:
release:
runs-on: "ubuntu-latest"
steps:
- name: "Git checkout"
uses: "actions/checkout@v2"
- name: "Set up JDK 17"
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
server-id: github
settings-path: ${{ github.workspace }}
- name: "Cache local Maven repository"
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
view raw gistfile1.txt hosted with ❤ by GitHub