echo "Reading key-value pairs from COMPOSITE_OUTPUT"
# Create a temporary file with the contents of COMPOSITE_OUTPUT
cat << EOF >> temp_output.txt
$COMPOSITE_OUTPUT
EOF

# Process each line in the file
while IFS= read -r line || [[ -n "$line" ]]; do
    if [[ "$line" =~ ^[A-Za-z0-9_]+=.* ]]; then
        key=$(echo "$line" | cut -d= -f1)
        value=$(echo "$line" | cut -d= -f2-)

        echo "$key<<EOF" >> $GITHUB_OUTPUT
        echo "$value" >> $GITHUB_OUTPUT
        echo "EOF" >> $GITHUB_OUTPUT
    fi
done < temp_output.txt

# Clean up
rm temp_output.txt