Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christian-draeger/read-properties
Github action to read java properties files
https://github.com/christian-draeger/read-properties
action actions android ci deployment github github-action github-actions groovy java kotlin properties spring-boot
Last synced: about 2 months ago
JSON representation
Github action to read java properties files
- Host: GitHub
- URL: https://github.com/christian-draeger/read-properties
- Owner: christian-draeger
- License: mit
- Created: 2020-01-19T10:40:16.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T14:17:31.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T19:34:09.362Z (2 months ago)
- Topics: action, actions, android, ci, deployment, github, github-action, github-actions, groovy, java, kotlin, properties, spring-boot
- Language: Shell
- Homepage:
- Size: 18.6 KB
- Stars: 21
- Watchers: 2
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - Read Properties - Read values from `.properties` files. (Community Resources / Utility)
- fucking-awesome-actions - Read Properties - Read values from `.properties` files. (Community Resources / Utility)
- awesome-workflows - Read Properties - Read values from `.properties` files. (Community Resources / Utility)
README
# Read Properties [![CI build](https://github.com/christian-draeger/read-properties/workflows/CI/badge.svg)](https://github.com/christian-draeger/read-properties/actions?query=workflow%3ACI+branch%3Amaster)
This is a GitHub action to read from java `.properties` files.
**Note:** It will work for all file-types that follow the `key=value` pattern.
> If you are also looking for an action that enables you to **write** values to `.properties` files use
> [Write Properties action](https://github.com/christian-draeger/write-properties)## Inputs
### `path`
**Required** The path to properties file to read.
### `properties`
**Required** The properties you want to read. Space separated
## Outputs
For each provided property, one output of the same name exists. Because the names of outputs can only contain alphanumeric characters, `-` and `_`, any other character is replaced by a `-`.
## Example usage
- name: Read value from Properties-file
id: read_property
uses: christian-draeger/[email protected]
with:
path: './src/main/resources/application.properties'
properties: 'the.key.of.a.property the.key.of.another.property'
- name: Do something with your bumped release version
run: echo ${{ steps.read_property.outputs.the-key-of-a-property }}
# will print "the value of 'the.key.of.a.property'"# License
The scripts and documentation in this project are released under the [MIT License](LICENSE)