From 1785b845610a35e156557c297824fc80e28d97de Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 25 Nov 2024 17:18:07 -0500 Subject: [PATCH] Update security runs to also support AL2 on node20 (#1002) * Make test security github action also support AL2 on node20 Signed-off-by: Peter Zhu (cherry picked from commit 4875dd557115b93c8bca523a3a87788681c8d16c) --- .github/workflows/test_aggregations.yml | 18 ++++++++++-------- .github/workflows/test_security.yml | 12 +++++++----- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_aggregations.yml b/.github/workflows/test_aggregations.yml index e49c47eb5..281b3dc02 100644 --- a/.github/workflows/test_aggregations.yml +++ b/.github/workflows/test_aggregations.yml @@ -10,9 +10,6 @@ on: branches: - "*" - "feature/**" -env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - jobs: Get-CI-Image-Tag: uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main @@ -33,16 +30,20 @@ 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 + 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 }} + - name: Checkout neural-search - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'temurin' java-version: ${{ matrix.java }} - name: Run tests @@ -61,11 +62,12 @@ jobs: steps: - name: Checkout neural-search - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'temurin' java-version: ${{ matrix.java }} - name: Run tests diff --git a/.github/workflows/test_security.yml b/.github/workflows/test_security.yml index be7ca9a11..58b803f5e 100644 --- a/.github/workflows/test_security.yml +++ b/.github/workflows/test_security.yml @@ -10,8 +10,6 @@ on: branches: - "*" - "feature/**" -env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: Get-CI-Image-Tag: @@ -32,17 +30,21 @@ 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 + 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 }} + - name: Checkout neural-search - uses: actions/checkout@v1 + uses: actions/checkout@v4 with: submodules: true - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + distribution: 'temurin' java-version: ${{ matrix.java }} - name: Run tests