Creating a Push Pull Animation

I’m new to using Unity 2D. I’ve been able to learn how to create animations like idle, walk and jump through the animation editor, but I’m now trying to add an animation for my character where they are pushing and pulling when they interact with an object. I know how to make an object move with a rigidbody and box collider, but I can’t seem to find a specific tutorial where my player can push and pull objects with a linked animation. Any help would be great thanks!