Moving a Cube

If a create a cube with an animation that moves it side to side and my player walks to the side of it, the cube goes through him. How do i make the cube push my player?

use rigidbodies on either the player or the cube or both + colliders