cancel in progress github action

Created · Updated

Run A ───────── Running
Run B           Pending
Run C           新觸發

cancel-in-progress: trueLink to this section: cancel-in-progress: true

取消舊有正在執行的以及 pending 的 workflow,會以最新的 workflow 執行。

Run A → Cancelled
Run B → Cancelled / 被取代
Run C → Running

沒有設定 & cancel-in-progress: falseLink to this section: 沒有設定 & cancel-in-progress: false

舊有的 workflow 會繼續執行,pending 的會被新的取代,會等待正在執行的執行完畢才跑新的

A → Running
B → Pending
C → 取代 B
D → 取代 C

最後:
A → 完成
D → 執行

B、C 不會執行