- Notifications
You must be signed in to change notification settings - Fork3
GitHub Action to read values from Java's .properties files
License
madhead/read-java-properties
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
GitHub Action to read values from Java's.properties files.
Returning a single property is as simple as:
-uses:madhead/read-java-properties@latestid:versionwith:file:gradle.propertiesproperty:versiondefault:0.0.1-run:echo ${{ steps.version.outputs.value }}# Project's version from gradle.properties or 0.0.1 if it is not defined there
Alternatively, you could return all the values from the.properties file by employing theall flag:
-uses:madhead/read-java-properties@latestid:allwith:file:gradle.propertiesall:true-run:echo ${{ steps.all.outputs.version }}# Project's version from gradle.properties-run:echo ${{ steps.all.outputs.groupId }}# Project's groupID from gradle.properties…
To see the list of available versions of this action (latest in the example above), navigate to theReleases & Tags page of this repo.Whenever a new version is released, corresponding tags are created / updated.latest tag always points to the latest release.master label could also be used, being a synonym tolatest.There are also$major and$major.$minor tags pointing to the latest matching version (i.e. tag1 always points to the latest1.x version, and tag1.1 — to the latest1.1.x version).
To see this action… in action… check its integration test intest.yml.
Note, that due to the environment variables "leaking" from the workflow into the Docker container actions, if your workflow defines aJAVA_HOME variable, this action would fail.
Try not to setJAVA_HOME before running this action until this "leakage" is "fixed" by the GitHub Actions team.Which might never happen and be an unpleasant "feature" of GitHub Actions.
Read more about this issue in#28 and check theminimal reproducible example.
About
GitHub Action to read values from Java's .properties files
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.