New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose actions/setup-java
cache parameter
#30
Comments
Hej Stefano, there's a better way that enables you to make use of all inputs supported by the underlying
Copied from: https://github.com/oracle-actions/setup-java/wiki/Customize-setup-java-inputs where a usage example is given. |
Hi Christian, thanks for the fast feedback! Right, something like: 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@v2
with:
distribution: jdkfile
jdkFile: ${{ steps.download.outputs.archive }}
java-version: ${{ steps.download.outputs.version }}
cache: 'maven'
- name: ... or the alternative I had in mind (with the Maven example config from steps:
- name: 'Set up Java Development Kit'
uses: oracle-actions/setup-java@v1
with:
website: ...
release: ...
version: ...
- name: 'Cache local Maven repository'
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: ... but I was actually looking for something like: steps:
- name: 'Set up Java Development Kit'
uses: oracle-actions/setup-java@v1
with:
website: ...
release: ...
version: ...
cache: 'maven'
- name: ... which would be closer to the current one: steps:
- name: 'Set up Java Development Kit'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ...
cache: 'maven'
- name: ... Mostly a cosmetic request rather than a functional one 🙂 A concrete use case is the |
IMHO, setting up Java and build tool(s) in a single action like We also want the configuration surface of this action as minimal as possible: mainly to keep maintenance cost manageable but also to react more flexible to future changes of the underlying In the light of that, I'll close this feature request as not planned. |
Feedback very much appreciated 🙂 thanks! |
I would like to use this action as a replacement for some
actions/setup-java
usages we have but then we would lack the cache settings we have today.Would it be possible to expose the
cache
parameter for the underlyingactions/setup-java
?The workaround would be to have an explicit
actions/cache
configuration, but using onlyoracle-actions/setup-java
would be more elegant.The text was updated successfully, but these errors were encountered: