Skip to content

Commit

Permalink
Upgrade actions/checkout to v4
Browse files Browse the repository at this point in the history
Signed-off-by: Finn Carroll <[email protected]>
  • Loading branch information
finnegancarroll committed Sep 13, 2024
1 parent 6fd20f5 commit 683ab18
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 30 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write

env: # actions/checkout uses node 16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
- name: GitHub App token
id: github_app_token
Expand All @@ -22,7 +26,7 @@ jobs:
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ncipollo/release-action@v1
with:
github_token: ${{ steps.github_app_token.outputs.token }}
Expand Down
54 changes: 34 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ on:
branches:
- "*"

anchors:
job_defaults: &job_defaults
strategy:
matrix:
java: [21]

jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
with:
product: opensearch

linux-build:
<<: *job_defaults
needs: Get-CI-Image-Tag
strategy:
matrix:
java:
- 21
# Job name
name: Linux - Build Asynchronous Search
# This job runs on Linux.
Expand All @@ -33,19 +36,19 @@ jobs:
# need to switch to root so that github actions can install runner binary on container without permission issues.
options: --user root

env:
env: # actions/checkout uses node 16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set up JDK for build and test
- name: Set up JDK ${{ matrix.java }} for build and test
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 21
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: |
Expand All @@ -61,23 +64,24 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/upload-artifact@v3
with:
name: async-plugin-linux-21
name: async-plugin-linux-${{ matrix.java }}
path: ${{ steps.step-build-test-linux.outputs.build-test-linux }}
if-no-files-found: error

linux-test-docker:
<<: *job_defaults
needs: linux-build
strategy:
matrix:
java:
- 21
# Job name
name: Test Asynchronous Search with opensearchstaging docker
# This job runs on Linux.
runs-on: ubuntu-latest

env: # actions/checkout uses node 16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
- name: Checkout Branch
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: async-plugin-linux-${{ matrix.java }}
Expand Down Expand Up @@ -139,20 +143,25 @@ jobs:
path: build/testclusters/integTest-*/logs/*

windows-build:
<<: *job_defaults
# Job name
name: Windows - Build Asynchronous Search
# This job runs on Windows.
runs-on: windows-latest

env: # actions/checkout uses node 16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 21
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 21
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
run: ./gradlew.bat build -x integTest -x jacocoTestReport
env:
Expand All @@ -169,20 +178,25 @@ jobs:
path: asynchronous-search-artifacts

mac-os-build:
<<: *job_defaults
# Job name
name: MacOS - Build Asynchronous Search
# This job runs on Mac OS.
runs-on: macos-latest

env: # actions/checkout uses node 16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 21
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 21
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
run: ./gradlew build -x integTest -x jacocoTestReport
env:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ jobs:
id-token: write
contents: write

env: # actions/checkout uses node 16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
- name: Set Up JDK
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 21
- uses: actions/checkout@v3
java-version: ${{ matrix.java }}
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/multi-node-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:
branches:
- "*"

anchors:
job_defaults: &job_defaults
strategy:
matrix:
java: [21]

jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
Expand All @@ -28,20 +34,20 @@ jobs:
# need to switch to root so that github actions can install runner binary on container without permission issues.
options: --user root

env:
env: # actions/checkout uses node 16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 21
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: Run integration tests with multi node config
run: |
chown -R 1000:1000 `pwd`
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ jobs:
name: Build Asynchronous Search with JDK ${{ matrix.java }}
# This job runs on Linux
runs-on: ubuntu-latest

env: # actions/checkout uses node 16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

steps:
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
uses: actions/checkout@v4
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
Expand Down

0 comments on commit 683ab18

Please sign in to comment.