Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GitHub Action to read values from Java's .properties files

License

NotificationsYou must be signed in to change notification settings

madhead/read-java-properties

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

GitHub Action to read values from Java's.properties files.

Usage

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.

ERROR:JAVA_HOME is set to an invalid directory

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

Stars

Watchers

Forks

Packages

 
 
 

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp