From 627d66b171b07e422da29b90263bfbbdcbb0e340 Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Tue, 7 Dec 2021 16:36:08 +0800 Subject: [PATCH] [KYUUBI #1520] [BUILD] Switch to setup-java@v2 ### _Why are the changes needed?_ Migrate to GA setup-java from v1 to v2 https://github.com/actions/setup-java ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1520 from pan3793/ga. Closes #1520 7aad9d29 [Cheng Pan] nit 5b312423 [Cheng Pan] Use setup-java@v2 Authored-by: Cheng Pan Signed-off-by: Cheng Pan --- .github/workflows/master.yml | 16 ++++++++++------ .github/workflows/nightly.yml | 7 ++++--- .github/workflows/publish-snapshot.yml | 5 +++-- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index faca022b47e..7323715daef 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -16,9 +16,11 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - name: Setup JDK 8 + uses: actions/setup-java@v2 with: - java-version: '1.8' + distribution: zulu + java-version: 8 - run: build/mvn org.apache.rat:apache-rat-plugin:check - name: Upload rat report if: failure() @@ -61,8 +63,9 @@ jobs: steps: - uses: actions/checkout@v2 - name: Setup JDK ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{ matrix.java }} - uses: actions/cache@v1 with: @@ -117,10 +120,11 @@ jobs: SPARK_LOCAL_IP: localhost steps: - uses: actions/checkout@v2 - - name: Setup JDK 1.8 - uses: actions/setup-java@v1 + - name: Setup JDK 8 + uses: actions/setup-java@v2 with: - java-version: '1.8' + distribution: zulu + java-version: 8 - uses: actions/cache@v1 with: path: ~/.m2/repository/com diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b5a9583bc01..8b4af17c3b6 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,10 +16,11 @@ jobs: SPARK_LOCAL_IP: localhost steps: - uses: actions/checkout@v2 - - name: Setup JDK 1.8 - uses: actions/setup-java@v1 + - name: Setup JDK 8 + uses: actions/setup-java@v2 with: - java-version: '1.8' + distribution: zulu + java-version: 8 - uses: actions/cache@v1 with: path: ~/.m2/repository/com diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 01c8191179a..9667b894036 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -26,9 +26,10 @@ jobs: key: snapshot-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | snapshot-maven- - - name: Install Java 8 - uses: actions/setup-java@v1 + - name: Setup JDK 8 + uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - name: Publish snapshot - master if: ${{ matrix.branch == 'master' }}