https://github.com/touchlab/read-property
https://github.com/touchlab/read-property
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/touchlab/read-property
- Owner: touchlab
- License: mit
- Created: 2023-09-10T01:51:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-08T05:01:50.000Z (over 2 years ago)
- Last Synced: 2025-01-10T05:25:31.778Z (about 1 year ago)
- Language: TypeScript
- Size: 406 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Read a value from a Java/JVM Properties file
Simple action to read a value from a Java Properties file. The available options seem to use a container vs just JS, which didn't work well in the situations we needed it.
This action is very simple. We're currently using it to read version info from `gradle.properties`. Here is the yaml code:
```yaml
- uses: touchlab/read-property@main
id: versionprop
with:
file: ./gradle.properties
property: LIBRARY_VERSION
```
Accessing the value is also simple:
```yaml
- name: Print Output
id: output
run: echo "${{ steps.versionprop.outputs.propVal }}"
```
The outcome in cases of an error is currently undefined. We needed a quick and simple solution to the problem at hand. If there's demand, we'll define the edge cases better in the future. Please [reach out](https://touchlab.co/keepintouch).