☞ GitHub Action to write keys=values to a java .properties
file ☕️
- name: Write simple value to application.properties file
uses: GuillaumeFalourd/write-java-properties-file@v1
with:
file_path: ./src/main/resources/application.properties
property: property.key
value: value
- name: Write multiple values to application.properties file
uses: GuillaumeFalourd/write-java-properties-file@v1
with:
file_path: ./src/main/resources/application.properties
property: |
first.property.key
second.property.key
value: |
first value
second value
Field | Mandatory | Observation |
---|---|---|
file_path | YES | Path to the .properties file. |
property | YES | Property / Properties keys to write. |
value | YES | Value(s) of the given property / properties, in the same order. |
-
If the action is adding the first
key=value
at the same line as the lastkey=value
present on the file, add a new empty line to the file before using the action. -
The action currently doesn't support updating a key-value (PR are welcome!).
☞ If you're interested in contributing to this repository, please follow the guidelines
☞ This repository uses the Apache License 2.0