The Properties File Action allows you to perform read and write operations on properties files within your GitHub Actions workflows. This action is particularly useful for managing configuration files or properties used in your projects.
To use this action to , add the following step to your GitHub workflow:
# to READ key-value pairs from a properties file
- name: Read/Write Properties File
uses: kurt-code/gha-properties@v0.0.1
id: read-properties
with:
operation: 'read'
file-path: 'path/to/properties/file'
keys: 'key1,key2'
- name: Get the Read properties
run: |
echo "key1: ${{ steps.read-properties.outputs.key1 }}"
echo "key2: ${{ steps.read-properties.outputs.key2 }}"
# to WRITE key-value pairs to a properties file
- name: Read/Write Properties File
uses: kurt-code/gha-properties@v0.0.1
id: read-properties
with:
operation: 'write'
file-path: 'path/to/properties/file'
key-value-pairs: '{"key1": "value1", "key2": "value2"}'First, you'll need to have a reasonably modern version of
nodehandy. This won't work with versions older than 20, for instance.
Install the dependencies
npm installRun all check and build tasks
npm run all