File tree 2 files changed +31
-22
lines changed
2 files changed +31
-22
lines changed Original file line number Diff line number Diff line change @@ -25,29 +25,17 @@ runs:
25
25
using : ' composite'
26
26
steps :
27
27
- run : |
28
- INPUT_DIRECTORY="${{ inputs.directory }}"
29
- INPUT_OUTPUTS="$(echo '${{ inputs.outputs }}' | jq @json)"
30
- INPUT_KEYS="${{ inputs.keys }}"
31
- INPUT_EXTENSION="${{ inputs.extension }}"
32
- INPUT_BIN_PATH="${{ inputs.bin_path }}"
33
-
34
- if [[ -z "$BIN_PATH" ]]; then
35
- ## TODO: use "curl -sf https://[github releases - latest]] | PREFIX=. sh"
36
- exit 1;
37
- fi
38
-
39
- echo "::debug::Generating output using ${BIN_PATH}..."
40
-
41
- $BIN_PATH --keys="$INPUT_KEYS" --outputs=="$INPUT_OUTPUTS" \
42
- --directory="$INPUT_DIRECTORY" --extension="$INPUT_EXTENSION" && exit_status=$? || exit_status=$?
43
-
44
- rm -f $BIN_PATH
45
-
46
- if [[ $exit_status -ne 0 ]]; then
47
- echo "::error::Error generating output files from JSON"
48
- exit $exit_status;
49
- fi
28
+ bash $GITHUB_ACTION_PATH/entrypoint.sh
29
+ id: json2file
50
30
shell: bash
31
+ env:
32
+ # INPUT_<VARIABLE_NAME> is not available in Composite run steps
33
+ # https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
34
+ INPUT_DIRECTORY: ${{ inputs.directory }}
35
+ INPUT_OUTPUTS: ${{ inputs.outputs }}
36
+ INPUT_KEYS: ${{ inputs.keys }}
37
+ INPUT_EXTENSION: ${{ inputs.extension }}
38
+ INPUT_BIN_PATH: ${{ inputs.bin_path }}
51
39
52
40
branding :
53
41
icon : file-text
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ INPUT_OUTPUTS=" $( echo " $INPUT_OUTPUTS " | jq @json) "
5
+
6
+ if [[ -z " $INPUT_BIN_PATH " ]]; then
7
+ # # TODO: use "curl -sf https://[github releases - latest]] | PREFIX=. sh"
8
+ exit 1;
9
+ fi
10
+
11
+ echo " ::debug::Generating output using ${BIN_PATH} ..."
12
+
13
+ $INPUT_BIN_PATH --keys=" $INPUT_KEYS " --outputs==" $INPUT_OUTPUTS " \
14
+ --directory=" $INPUT_DIRECTORY " --extension=" $INPUT_EXTENSION " && exit_status=$? || exit_status=$?
15
+
16
+ rm -f " $INPUT_BIN_PATH "
17
+
18
+ if [[ $exit_status -ne 0 ]]; then
19
+ echo " ::error::Error generating output files from JSON"
20
+ exit $exit_status ;
21
+ fi
You can’t perform that action at this time.
0 commit comments