generated from tj-actions/docker-action
-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
action.yml
54 lines (52 loc) · 1.58 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
47
48
49
50
51
52
53
54
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, possible values: txt, json"
required: false
default: "txt"
bin_path:
description: "Path to the binary"
required: false
runs:
using: 'composite'
steps:
- name: Setup bin
uses: tj-actions/setup-bin@v1
id: setup-bin-rust
with:
repository-owner: tj-actions
repository: json2file
version: v1.7.7
language-type: 'rust'
- 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 || steps.setup-bin-rust.outputs.binary_path }}
branding:
icon: file-text
color: white