Github Action that creates a branch (remotely, via the GitHub API), then deletes it in a "post" step
steps:
- name: Initialize test branch
uses: runsascoded/tmp-branch-action@v1
with:
branch: ${{ env.branch }}
sha: ${{ env.init }}
(from runsascoded/update-submodules)
See also tmp-branch-action on the Actions marketplace.