Make object move with Bool C#

my goal is make my spike move Up and Down
when the bool is checked.
But if i run? no matter what, it turned to True, and start to going down!!! I didnt even checked it.
Please help me…!

using UnityEngine;
using System.Collections;

public class MovingSpike : MonoBehaviour

{

public GameObject spike;
public float moveSpeed;
public Transform spikeUp;
public Transform spikeDown;
public bool moving;

void Update () 
{
	if (moving = false) 
	{
		spike.transform.position = Vector3.MoveTowards (spike.transform.position, spikeUp.transform.position, Time.deltaTime * moveSpeed);
	}
	if (moving = true) 
	{
		spike.transform.position = Vector3.MoveTowards (spike.transform.position, spikeDown.position, Time.deltaTime * moveSpeed);

	} 
}

}

At the very least, this…

if (moving = false) 

and this…

if (moving = true) 

Should be:

if (moving == false) 

and…

if (moving == true)