Builds are invoked by a webhook. Those builds are not identical: one of them is for branch and another one is PR. When you push to a branch with opened PR webhook sends two requests: branch "push" and PR "sync". You can avoid building branch if there is an opened PR by adding this to your appveyor.yml:
Looks correct to me. You created a new branch, did a push - build of the branch started. You opened a new PR - another build started. Now, if you do another push into feature branch with open PR only PR build will be started.
No PR builds would be started at all which is, of course, not what we expect from CI for OSS project.
Could you please elaborate what you mean under "such an action"? Typical workflow would be: create feature branch, do some commits to that branch, push - branch build started. Do another commits into feature branch, push it - another branch build started. Open a new PR for the feature branch - new PR build is started. How is GitHub Actions different?
on 18 Aug, 2021 07:14 PM
The screenshot show the runs created by GitHub actions. You see 4 runs (one for each workflow) - no workflow has been triggered twice. They have only been started once the PR has been created. Once the PR is merged to the main branch, another 4 runs will be created. This is the behavior I would also like to see from AppVeyor. However, I see 2 builds per commit to a PR - only when it is merged, I only see 1 build.