File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ export E2E_IMAGE_TAG=latest
88
99GITHUB_ENV=$( mktemp /tmp/github_env.XXXXXX)
1010
11+ for input in $( yq ' .inputs | to_entries | .[] | .key + "=" + .value.default' .github/actions/deploy/action.yaml) ; do
12+ inputName=GITHUB_INPUTS_${input% =* }
13+ [ -z " ${! inputName} " ] && export GITHUB_INPUTS_$input
14+ done
15+
1116array_length=$( yq " .runs.steps | length - 1" .github/actions/deploy/action.yaml)
1217for i in $( seq 0 $array_length ) ; do
1318 # step=$(yq ".runs.steps[$i]" .github/actions/deploy/action.yaml)
@@ -24,7 +29,8 @@ for i in $(seq 0 $array_length); do
2429 # Inject variables
2530 # We use `sed` to replace github variable references and avoid bad substitution error from bash
2631 env_variables=$( yq ' .runs.steps[' $i ' ].env | to_entries | .[] | .key + "=" + .value' .github/actions/deploy/action.yaml \
27- | sed ' s/\${{.*}}//' )
32+ | sed -e ' s/${{ *inputs.\([[:graph:]]*\) *}}/$GITHUB_INPUTS_\1/' -e ' s/\${{.*}}//' \
33+ | envsubst )
2834 [ -n " $env_variables " ] && export $env_variables
2935
3036 if [ " $working_dir " != " null" ]; then
You can’t perform that action at this time.
0 commit comments