catalyst / catalyst-moodle-workflows

4 stars 9 forks source link

Workflows should use concurrency option to reduce waiting time #22

Closed keevan closed 2 years ago

keevan commented 2 years ago

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency

Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time.

Which means using this setting:

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

Any new pushes to a PR / branch will cancel the previous workflow and let the new one run. Probably at a faster rate since it doesn't have to wait for the previous to finish (if there was a limit, and it's probably more eco-friendly anyways)

brendanheywood commented 2 years ago

+1