To save the running resource, we could cancel the current run when there has new commit pushed to the pull requet.
Workflow to update:
Basically this task could be completed by adding:
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
Doc: https://stackoverflow.com/a/67939898