cnti-testcatalog / testsuite

📞📱☎️📡🌐 Cloud Native Telecom Initiative (CNTI) Test Catalog is a tool to check for and provide feedback on the use of K8s + cloud native best practices in networking applications and platforms
https://wiki.lfnetworking.org/display/LN/Test+Catalog
Apache License 2.0
173 stars 71 forks source link

workflow: Cancel workflows on push #2113

Closed kosstennbl closed 2 months ago

kosstennbl commented 2 months ago

Description

In our CICD, when new commit is pushed (or amended) while workflow for old one is still running - there is no auto-cancelation. Old workflows have to be canceled manually by maintainers to avoid unneccessary waiting.

This change fixes that issue by grouping workflows by PR number or branch ref (in case for push event), and if new workflow is ran in the same group - old one would be automatically cancelled.

Change is relatively simple, so issue wasn't created for it.