I’m in the process of migrating our website CI/CD workflow over to GitHub Actions. Currently, the process is triggered by webhooks from GitHub for the pull_request and commit events.
Some of our websites can take a long time to build and we’ve seen situations where a PR can be updated while an existing build is taking place. For example, a contributor might raise a PR then, while they are waiting, realise they’ve got a spelling mistake in their contribution and fix it, thus updating the PR.
In our code that is triggered on the pull_request event, we spot this by checking any ongoing builds and cancelling any that are for the same pull request.
My question is this: is there any way to achieve the same goal with Actions?