diff --git a/.changeset/patch-group-github-output-redirects.md b/.changeset/patch-group-github-output-redirects.md new file mode 100644 index 00000000000..21cc4b0d739 --- /dev/null +++ b/.changeset/patch-group-github-output-redirects.md @@ -0,0 +1,5 @@ +--- +"gh-aw": patch +--- + +Group the consecutive `$GITHUB_OUTPUT` redirects in the MCP setup scripts and their tests to satisfy SC2129 shellcheck and keep output handling consistent. diff --git a/actions/setup/js/mcp_server_core.test.cjs b/actions/setup/js/mcp_server_core.test.cjs index 0fe25fc0ffd..fd8ca154458 100644 --- a/actions/setup/js/mcp_server_core.test.cjs +++ b/actions/setup/js/mcp_server_core.test.cjs @@ -781,9 +781,11 @@ echo "result=success" >> $GITHUB_OUTPUT fs.writeFileSync( handlerPath, `#!/bin/bash -echo "first=value1" >> $GITHUB_OUTPUT -echo "second=value2" >> $GITHUB_OUTPUT -echo "third=value with spaces" >> $GITHUB_OUTPUT +{ + echo "first=value1" + echo "second=value2" + echo "third=value with spaces" +} >> $GITHUB_OUTPUT `, { mode: 0o755 } ); diff --git a/actions/setup/sh/start_mcp_gateway.sh b/actions/setup/sh/start_mcp_gateway.sh index 52513ab2edc..accd64aa221 100755 --- a/actions/setup/sh/start_mcp_gateway.sh +++ b/actions/setup/sh/start_mcp_gateway.sh @@ -422,7 +422,9 @@ print_timing $SCRIPT_START_TIME "Overall gateway startup" echo "" # Output PID as GitHub Actions step output for use in cleanup -echo "gateway-pid=$GATEWAY_PID" >> $GITHUB_OUTPUT # Output port and API key for use in stop script (per MCP Gateway Specification v1.1.0) -echo "gateway-port=${MCP_GATEWAY_PORT}" >> $GITHUB_OUTPUT -echo "gateway-api-key=${MCP_GATEWAY_API_KEY}" >> $GITHUB_OUTPUT +{ + echo "gateway-pid=$GATEWAY_PID" + echo "gateway-port=${MCP_GATEWAY_PORT}" + echo "gateway-api-key=${MCP_GATEWAY_API_KEY}" +} >> $GITHUB_OUTPUT diff --git a/actions/setup/sh/start_safe_inputs_server.sh b/actions/setup/sh/start_safe_inputs_server.sh index 1787104cd25..ecc1667dbe6 100755 --- a/actions/setup/sh/start_safe_inputs_server.sh +++ b/actions/setup/sh/start_safe_inputs_server.sh @@ -126,5 +126,7 @@ for i in {1..10}; do done # Output the configuration for the MCP client -echo "port=$GH_AW_SAFE_INPUTS_PORT" >> "$GITHUB_OUTPUT" -echo "api_key=$GH_AW_SAFE_INPUTS_API_KEY" >> "$GITHUB_OUTPUT" +{ + echo "port=$GH_AW_SAFE_INPUTS_PORT" + echo "api_key=$GH_AW_SAFE_INPUTS_API_KEY" +} >> "$GITHUB_OUTPUT" diff --git a/actions/setup/sh/start_safe_outputs_server.sh b/actions/setup/sh/start_safe_outputs_server.sh index 50195cff75e..a7449058e05 100755 --- a/actions/setup/sh/start_safe_outputs_server.sh +++ b/actions/setup/sh/start_safe_outputs_server.sh @@ -126,5 +126,7 @@ for i in {1..60}; do done # Output the configuration for the MCP client -echo "port=$GH_AW_SAFE_OUTPUTS_PORT" >> "$GITHUB_OUTPUT" -echo "api_key=$GH_AW_SAFE_OUTPUTS_API_KEY" >> "$GITHUB_OUTPUT" +{ + echo "port=$GH_AW_SAFE_OUTPUTS_PORT" + echo "api_key=$GH_AW_SAFE_OUTPUTS_API_KEY" +} >> "$GITHUB_OUTPUT"