Skip to content

Merge pull request #13887 from grails/dependabot/gradle/6.2.x/org.gra… #4387

Merge pull request #13887 from grails/dependabot/gradle/6.2.x/org.gra…

Merge pull request #13887 from grails/dependabot/gradle/6.2.x/org.gra… #4387

Workflow file for this run

name: Java CI
on:
push:
branches:
- '[4-9]+.[0-9]+.x'
- '[3-9]+.[3-9]+.x'
pull_request:
branches:
- '[4-9]+.[0-9]+.x'
- '[3-9]+.[3-9]+.x'
workflow_dispatch:
jobs:
build:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
strategy:
matrix:
java: ['11', '14']
env:
WORKSPACE: ${{ github.workspace }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Run Build
id: build
uses: gradle/gradle-build-action@29c0906b64b8fc82467890bfb7a0a7ef34bda89e # v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: build groovydoc
publish:
if: github.event_name == 'push'
needs: ["build"]
permissions:
contents: read # to fetch code (actions/checkout)
checks: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4
with:
distribution: 'adopt'
java-version: 11
- name: Publish Artifacts (repo.grails.org)
id: publish
uses: gradle/gradle-build-action@29c0906b64b8fc82467890bfb7a0a7ef34bda89e # v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
with:
arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish
docs:
if: github.event_name == 'push'
needs: publish
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Extract Target Branch
id: extract_branch
run: |
echo "Determining Target Branch"
TARGET_BRANCH=${GITHUB_REF#refs/heads/}
echo $TARGET_BRANCH
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
- name: Invoke grails-doc release workflow
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/grails-doc
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
invoke-third-party-workflows:
if: github.event_name == 'push'
needs: ["build", "publish"]
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
steps:
- name: Extract branch name
id: extract_branch
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
- name: Create Snapshot Message for the Workflow Dispatch
id: dispatch_message
run: echo "value={\"message\":\"New Core Snapshot $(date) - $GITHUB_SHA\"}" >> $GITHUB_OUTPUT
- name: Invoke the Java CI workflow in Grails Functional Tests
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/grails-functional-tests
ref: ${{ steps.extract_branch.outputs.value }}
token: ${{ secrets.GH_TOKEN }}
inputs: ${{ steps.dispatch_message.outputs.value }}