Modify action buttons for custom post type

I have created a custom post type called “form-enquiry”. I’m trying to change the actions that appear when the admin hovers over the posts on the edit.php page. See screenshot below

enter image description here

I managed to find the array which was holding the settings and add my own custom one called “reply” into the array. However, I can’t work out how to get post id for the link.

See below for the code I have so far. Is it possible to get the id for the post and insert it into the link to get something like post.php?post=95&action=reply when the user clicks on the custom button.

  function remove_quick_edit($actions)
  {
    if($_GET['post_type'] == 'form-enquiry')
    {
      unset($actions['inline hide-if-no-js']);
    }

    $actions['reply'] = '<a href="#">Reply</a>';
    //return $actions;

    echo '<pre>'; print_r($actions); echo '</pre>';
  }
  add_filter('post_row_actions', 'remove_quick_edit', 10, 1);

Solutions Collecting From Web of "Modify action buttons for custom post type"

If you look here https://developer.wordpress.org/reference/hooks/post_row_actions/, the second argument for the post_row_actions filter is a post object, so you should be able to do :

 function remove_quick_edit($actions, $post)
  {
    $post_id = $post->ID;
    $post_type = $post->post_type;
    if($_GET['post_type'] == 'form-enquiry')
    {
      unset($actions['inline hide-if-no-js']);
    }

    $actions['reply'] = '<a href="#">Reply</a>';
    //return $actions;

    echo '<pre>'; print_r($actions); echo '</pre>';
  }
  add_filter('post_row_actions', 'remove_quick_edit', 10, 2);