There's `$post_id` arg passed into the callback action so that you can use it instead of `global $post`.