I am creating a
deployment event inside an action (using
avakar/create-deployment). Another workflow is listening for that event and performs the actual deployment. That works just fine on the repo’s main branch.
However, for preview deployments of PRs, this does not work. Although the event is created with
auto_merge being false (double checked using debug logs!), and the feature branch not being behind the main branch, the event always seems to refer to a newly generated merge commit (which is identical to the feature branch commit).
This somehow causes the second workflow (with
on: deployment) to fail, with “Unknown event” / “Unnamed workflow”, as apparently Github is somehow not able to use the workflow when that commit is not part of a branch/tag:
As you can see in the 2nd screenshot there is a merge commit, which shouldn’t be the case AFAIU. Also the error is quite cryptic…