Update example projects to set hibernate-ehcache dependency #1812
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Java CI" | |
on: | |
push: | |
branches: | |
- '[6-9]+.[0-9]+.x' | |
pull_request: | |
branches: | |
- '[6-9]+.[0-9]+.x' | |
workflow_dispatch: | |
inputs: | |
message: | |
description: 'Snapshot information (e.g. New Core Snapshot Tue Dec 15 00:07:18 UTC 2020 f212f54)' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
continue-on-error: true | |
permissions: | |
contents: read | |
packages: read | |
env: | |
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8 | |
strategy: | |
matrix: | |
mongodb-version: ['4', '5', '6', '7', '8'] | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "βοΈ Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: liberica | |
- name: "π Setup Gradle" | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | |
- name: "βΆοΈ Start MongoDB (needed for some tests)" | |
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # v1.12.0 (Use commit sha as this is a 3rd party action) | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
- name: "π¨ Run Build" | |
env: | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew build --continue | |
publish: | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: read | |
if: github.event_name == 'push' | |
needs: build | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v4 | |
- name: "βοΈ Setup JDK" | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: liberica | |
- name: "π Setup Gradle" | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} | |
- name: "π€ Publish Snapshot to repo.grails.org" | |
id: publish | |
env: | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
GRADLE_PUBLISH_RELEASE: 'false' | |
MAVEN_PUBLISH_USERNAME: ${{ secrets.MAVEN_PUBLISH_USERNAME }} | |
MAVEN_PUBLISH_PASSWORD: ${{ secrets.MAVEN_PUBLISH_PASSWORD }} | |
run: ./gradlew --no-build-cache publish | |
- name: "π¨ Build Docs" | |
id: docs | |
if: steps.build.outcome == 'success' | |
env: | |
GITHUB_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew docs:docs | |
- name: "π Determine docs target repository" | |
if: steps.docs.outcome == 'success' | |
uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1 (Use commit sha as this is a 3rd party action) | |
id: docs_target | |
with: | |
cond: ${{ github.repository == 'grails/gorm-mongodb' }} | |
if_true: grails/grails-data-mapping | |
if_false: ${{ github.repository }} | |
- name: "π€ Publish to Github Pages" | |
if: steps.docs.outcome == 'success' | |
uses: grails/github-pages-deploy-action@v3 | |
env: | |
BRANCH: gh-pages | |
COMMIT_EMAIL: [email protected] | |
COMMIT_NAME: grails-build | |
DOC_FOLDER: gh-pages | |
DOC_SUB_FOLDER: mongodb | |
FOLDER: docs/build/docs | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
TARGET_REPOSITORY: ${{ steps.docs_target.outputs.value }} |