How to tell which object uses which animation/action
Actions are globally stored in bpy.data.actions, regardless of scenes.

Every object can reference one and only one action (Object.animation_data.action). Thus, you can't know which actions are made for / compatible with which objects without extra work on the user oder coder side.


User-based solution:Let the user specify which actions are supposed to be exported for which objects, either in a Panel in the export file selector or for every object in the object tab - both are not ideal. The former needs to be re-done every time (unless presets are used), in the latter renaming actions will break it.
Programmatic solution:Check all FCurves' data_paths and see if these properties are available for your object type. This should work reliable to distinguish Armature actions from other more generic ones, as the data paths start with 'pose.bones' for Pose actions.