From 0a06ddbff8dfc1d471231bd419deb9c39fad7770 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 18 Nov 2024 12:11:00 -0500 Subject: [PATCH] Enable custom start commands and options to resolve GHA issues (#676) * Enable custom start commands and options to resolve GHA issues Signed-off-by: Peter Zhu * Enable custom start commands and options to resolve GHA issues Signed-off-by: Peter Zhu * Enable custom start commands and options to resolve GHA issues Signed-off-by: Peter Zhu --------- Signed-off-by: Peter Zhu (cherry picked from commit 8caf59ca49a3fa8c80cf05b1877b29bf32afd8b2) --- .github/workflows/build.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e52a1cb..65409ffa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,12 +33,11 @@ jobs: # this image tag is subject to change as more dependencies and updates will arrive over time image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} # need to switch to root so that github actions can install runner binary on container without permission issues. - options: --user root - - env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }} steps: + - name: Run start commands + run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }} # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Set Up JDK ${{ matrix.java }} uses: actions/setup-java@v1 @@ -46,7 +45,7 @@ jobs: java-version: ${{ matrix.java }} # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build with Gradle id: step-build-test-linux run: | @@ -60,7 +59,7 @@ jobs: uses: codecov/codecov-action@v1.2.1 with: token: ${{ secrets.CODECOV_TOKEN }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: async-plugin-linux-${{ matrix.java }} path: ${{ steps.step-build-test-linux.outputs.build-test-linux }} @@ -80,8 +79,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Branch - uses: actions/checkout@v2 - - uses: actions/download-artifact@v3 + uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: async-plugin-linux-${{ matrix.java }} - name: Pull and Run Docker for security tests @@ -135,7 +134,7 @@ jobs: ./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" fi - name: Upload failed logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: failure() with: name: logs @@ -154,7 +153,7 @@ jobs: java-version: 11 # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build with Gradle run: ./gradlew.bat build -x integTest -x jacocoTestReport env: @@ -165,7 +164,7 @@ jobs: cp ./build/distributions/*.zip asynchronous-search-artifacts # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: asynchronous-search-plugin-windows path: asynchronous-search-artifacts @@ -183,7 +182,7 @@ jobs: java-version: 11 # This step uses the checkout Github action: https://github.com/actions/checkout - name: Checkout Branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build with Gradle run: ./gradlew build -x integTest -x jacocoTestReport env: @@ -194,7 +193,7 @@ jobs: cp ./build/distributions/*.zip asynchronous-search-artifacts # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: asynchronous-search-plugin-mac path: asynchronous-search-artifacts