Skip to content

spring-example: completed #12

spring-example: completed

spring-example: completed #12

Workflow file for this run

name: Gradle CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
env:
JAVA_VERSION: 21
GRADLE_VERSION: '8.5' # Adjust if you want a different Gradle version
CACHE_KEY: gradle-local-repo
GRADLE_TASKS: build # Define your Gradle tasks here
jobs:
build:
name: 'Build & Test'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Install Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: ${{ env.GRADLE_VERSION }}
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ env.CACHE_KEY }}-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ env.CACHE_KEY }}-${{ runner.os }}-
- name: Gradle Build
run: gradle ${{ env.GRADLE_TASKS }}