Skip to content

Commit 2b40576

Browse files
authored
Fix lucene snapshot workflow to take JDk as input and fall back to 25 (opensearch-project#19696)
Signed-off-by: Marc Handalian <marc.handalian@gmail.com>
1 parent c9a5fab commit 2b40576

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/lucene-snapshots.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
type: string
1212
required: false
1313
default: 'main'
14+
java_version:
15+
description: 'Java version to use'
16+
type: string
17+
required: false
18+
default: '25'
1419

1520
jobs:
1621
publish-snapshots:
@@ -28,23 +33,18 @@ jobs:
2833
repository: 'apache/lucene'
2934
ref: ${{ github.event.inputs.ref }}
3035

31-
- name: Get Java Min Version and Lucene Revision from Lucene Repository
36+
- name: Get Lucene Revision
3237
run: |
33-
java_version=`cat build.gradle | grep minJavaVersion | head -1 | grep -Eo '_[0-9]+$' | tr -d '_'`
34-
echo "JAVA_VERSION=$java_version" >> $GITHUB_ENV
3538
echo "REVISION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
3639
37-
- name: Setup JDK ${{ env.JAVA_VERSION }}
40+
- name: Setup JDK ${{ github.event.inputs.java_version }}
3841
uses: actions/setup-java@v5
3942
with:
40-
java-version: ${{ env.JAVA_VERSION }}
43+
java-version: ${{ github.event.inputs.java_version }}
4144
distribution: 'temurin'
4245

43-
- name: Initialize gradle settings
44-
run: ./gradlew localSettings
45-
4646
- name: Publish Lucene to local maven repo.
47-
run: ./gradlew publishJarsPublicationToMavenLocal -Pversion.suffix=snapshot-${{ env.REVISION }}
47+
run: ./gradlew publishJarsPublicationToMavenLocal -Pversion.suffix=snapshot-${{ env.REVISION }} -x javadoc
4848

4949
- name: Configure AWS credentials
5050
uses: aws-actions/configure-aws-credentials@v5

0 commit comments

Comments
 (0)