Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/actions/composite/getJavaVersion/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Get Java version
description: Reads the Java version from .java-version file

outputs:
version:
description: The Java version from .java-version file
value: ${{ steps.getVersion.outputs.VERSION }}

runs:
using: composite
steps:
- name: Get Java version
id: getVersion
shell: bash
run: echo "VERSION=$(cat .java-version | tr -d '\n')" >> "$GITHUB_OUTPUT"
6 changes: 5 additions & 1 deletion .github/workflows/buildAndroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,16 @@ jobs:
- name: Setup Node
uses: ./.github/actions/composite/setupNode

- name: Get Java version
id: get-java-version
uses: ./.github/actions/composite/getJavaVersion

- name: Setup Java
# v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
distribution: oracle
java-version: 17
java-version: ${{ steps.get-java-version.outputs.version }}

- name: Setup Gradle
# v4
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,16 @@ jobs:
cd Mobile-Expensify
npm run grunt:build:shared

- name: Get Java version
id: get-java-version
uses: ./.github/actions/composite/getJavaVersion

- name: Setup Java
# v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
distribution: 'oracle'
java-version: '17'
distribution: oracle
java-version: ${{ steps.get-java-version.outputs.version }}

- name: Setup Ruby
# v1.229.0
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/publishReactNativeAndroidArtifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,15 @@ jobs:
with:
IS_HYBRID_BUILD: ${{ matrix.is_hybrid }}

- name: Get Java version
id: get-java-version
uses: ./.github/actions/composite/getJavaVersion

- name: Setup Java
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
distribution: oracle
java-version: 17
java-version: ${{ steps.get-java-version.outputs.version }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,16 @@ jobs:
sed -i 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc
echo "APP_PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc

- name: Get Java version
id: get-java-version
uses: ./.github/actions/composite/getJavaVersion

- name: Setup Java
# v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
distribution: 'oracle'
java-version: '17'
distribution: oracle
java-version: ${{ steps.get-java-version.outputs.version }}

- name: Setup Ruby
# v1.229.0
Expand Down
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17