Skip to content

.tip

· one of the small things

Cancel the previous run when a new push arrives

Push to a branch five times in five minutes and you get five queued CI runs, when only the last one matters.

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

That gives you one group per branch per workflow. Leave it off deploy workflows, where stopping halfway is worse than waiting.

ci