-
Notifications
You must be signed in to change notification settings - Fork 11
Customize setup java inputs
Christian Stein edited this page Aug 3, 2022
·
2 revisions
By default, the oracle-actions/setup-java
action delegates the actual installation to actions/setup-java
using its default input value.
In order to use customized inputs for actions/setup-java
step in your workflow run, you may suppress the automatic delegation (install: false
) and call the installation action with your custom input values.
For example:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Download Java Development Kit'
id: download
uses: oracle-actions/setup-java@v1
with:
website: ...
release: ...
version: ...
install: false # Suppress automatic delegation to `actions/setup-java`
- name: 'Install Java Development Kit'
uses: actions/setup-java@v3
with:
distribution: jdkfile
jdkFile: ${{ steps.download.outputs.archive }}
java-version: ${{ steps.download.outputs.version }}
#
# HERE BE CUSTOM INPUTS
#
- run: java --version
Consult actions/setup-java
's action.yml and its documentation for available inputs.