A GitHub Action that takes a Java properties file (typically gradle.properties) and exports each property as an environment variable for use in subsequent steps of your workflow.
file(required): Location of the properties file (default:gradle.properties)prefix(optional): Prefix to add to environment variable names. If provided without a trailing underscore, one will be added automatically (e.g.,FOObecomesFOO_)
- name: "Export Gradle Properties"
uses: apache/grails-github-actions/export-gradle-properties@asf
- name: "Use the property"
run:
echo "${PROJECT_VERSION}"
env:
PROJECT_VERSION: ${{ env.projectVersion }}- name: "Export Gradle Properties with Prefix"
uses: apache/grails-github-actions/export-gradle-properties@asf
with:
prefix: 'FOO'
- name: "Use the prefixed property"
run:
echo "${JAVA_VERSION}"
env:
JAVA_VERSION: ${{ env.FOO_javaVersion }}