File tree Expand file tree Collapse file tree
.github/actions/nx-affected-list Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,14 +20,17 @@ runs:
2020 - name : Get affected Nx projects
2121 id : affected
2222 shell : bash
23+ env :
24+ INPUT_BASE : ${{ inputs.base }}
25+ INPUT_HEAD : ${{ inputs.head }}
2326 run : |
2427 set -euo pipefail
25- ARGS=""
26- if [ -n "${{ inputs.base }} " ]; then ARGS="$ARGS --base=${{ inputs.base }}" ; fi
27- if [ -n "${{ inputs.head }} " ]; then ARGS="$ARGS --head=${{ inputs.head }}" ; fi
28+ extra_args=()
29+ if [ -n "${INPUT_BASE:-} " ]; then extra_args+=( --base="$INPUT_BASE") ; fi
30+ if [ -n "${INPUT_HEAD:-} " ]; then extra_args+=( --head="$INPUT_HEAD") ; fi
2831
2932 # Fail the step on nx/git errors so empty output cannot skip integration jobs silently.
30- AFFECTED=$(./node_modules/.bin/nx show projects --affected $ARGS | tr '\n' ' ' | xargs)
33+ AFFECTED=$(./node_modules/.bin/nx show projects --affected "${extra_args[@]}" | tr '\n' ' ' | xargs)
3134 echo "affected=$AFFECTED" >> "$GITHUB_OUTPUT"
3235
3336 if [ -n "$AFFECTED" ]; then
You can’t perform that action at this time.
0 commit comments