forked from tj-actions/json2file
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
46 lines (44 loc) · 1.3 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: json2file
description: Generate file output from JSON
author: jackton1
inputs:
directory:
description: "Directory to write to"
required: true
default: ".github/outputs"
outputs:
description: "JSON string"
required: true
keys:
description: "List of Keys to read from the `outputs` JSON string"
required: true
skip_missing_keys:
description: "Skip missing keys not found in the `outputs` JSON string"
required: false
default: "false"
extension:
description: "File extension to use"
required: false
default: "txt"
bin_path:
description: "Path to the binary"
required: false
runs:
using: 'composite'
steps:
- run: |
bash $GITHUB_ACTION_PATH/entrypoint.sh
id: json2file
shell: bash
env:
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
INPUT_DIRECTORY: ${{ inputs.directory }}
INPUT_OUTPUTS: ${{ inputs.outputs }}
INPUT_KEYS: ${{ inputs.keys }}
INPUT_SKIP_MISSING_KEYS: ${{ inputs.skip_missing_keys }}
INPUT_EXTENSION: ${{ inputs.extension }}
INPUT_BIN_PATH: ${{ inputs.bin_path }}
branding:
icon: file-text
color: white