swinton / screenshot-website

:camera_flash: A GitHub Action to capture screenshots of a website, across Windows, Mac, and Linux
https://git.io/screenshot-website
ISC License
187 stars 22 forks source link

ci: Cancel in-progress GitHub Actions workflow on repeated pushes #42

Closed jcfr closed 1 year ago

jcfr commented 1 year ago

Using jobs.<job_id>.concurrency ensures that only a single job or workflow using the same concurrency group will run at a time.

This means that after updating a given branch, the on-going build will be cancelled ensuring the available runners are used to build the latest version.

See https://docs.github.com/en/actions/using-jobs/using-concurrency

Adapted from scikit-build/scikit-build@f0db9f31f (ci: cancel in-progress on repeated pushes)