How to merge current branch into another branch

Hi Peeps, I’m new to github actions, I’ve generally worked with bitbucket in the past and currently looking to migrate away from bitbucket.

How would I go about merging the current branch into another branch.

For example a developer will do either the following

  • PR to update/create a branch called feature/xyz
  • Push directly to branch feature/xyz to origin
    When the above happens I would like to merge into a test branch,

Any tips would be nice, Thanks