github action to create a branch and pull request

Solution 1:

I've used Create Pull Request GHA (https://github.com/peter-evans/create-pull-request) and it is quite easy to use. Within the action itself you can even specify the branch name. In the next step, you can also run shell commands. Example as below:

  - name: Create Pull Request
    id: cpr
    uses: peter-evans/create-pull-request@v3
  - name: Check outputs
    run: |
      echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
      echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"