The solution I just found:
- In the repo1 (sender): use the curl action mentioned by @bhito
- In the repo2 (triggered): the main and no main branch must have the same workflow file name. Delete the content of the main branch workflow. Specify the trigger action on: repository_dispatch in the workflow of no main branch. (With this, the dispatch action find the file in repo2 and as it is empty, it will trigger the workflow of the branch given in the curl action with the param "ref")
Hope this help!