-
Notifications
You must be signed in to change notification settings - Fork 767
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
Add overwrite-settings
to disable overwriting settings.xml
#82
Conversation
Anything holding this? |
@clarkbw @konradpabjan Is there any interested in me updating this PR to the latest |
@@ -36,6 +36,9 @@ inputs: | |||
settings-path: | |||
description: 'Path to where the settings.xml file will be written. Default is ~/.m2.' | |||
required: false | |||
overwrite-settings: | |||
description: 'Overwrite the settings.xml file if it exists. Default is "true".' | |||
required: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest setting default: true
in YAML file.
Details: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#inputsinput_iddefault
@@ -23,8 +23,15 @@ async function run() { | |||
core.getInput('server-username', {required: false}) || undefined; | |||
const password = | |||
core.getInput('server-password', {required: false}) || undefined; | |||
const overwriteSettings = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to use the same approach like actions/checkout
: https://github.com/actions/checkout/blob/main/src/input-helper.ts#L118
May be we can wrap it in small util func
Closing as duplicate of #136 |
In some scenarios there's already a valid Maven settings file which shouldn't or cannot be overwritten by actions/setup-java.
The
overwrite-settings
(default:true
) configuration setting enables users to disable the generation of the Maven settings file by actions/setup-java.Closes #79
Refs joschi/setup-jdk#11