GitHub supports auto-merging of pull requests (PRs) when GitHub Actions succeed. This is a bit of an overlooked feature (I see almost no one using it) and it’s also poorly documented. So, here is a little tutorial. For the repository that you want to enable auto-merge:
Here, “build-and-deploy” is the name of the job that you defined in your
.yml file in
Now, when you create a PR on a repository for which you have sufficient rights, you can click on “auto-merge”:
Note: It is very important to specify a job! Otherwise, the “auto-merge” button will simply not appear.