diff --git a/.github/workflows/cancel_duplicate_workflow_runs.yml b/.github/workflows/cancel_duplicate_workflow_runs.yml new file mode 100644 index 0000000000000..2bf6cc2304e64 --- /dev/null +++ b/.github/workflows/cancel_duplicate_workflow_runs.yml @@ -0,0 +1,18 @@ +name: Cancelling Duplicates +on: + workflow_run: + workflows: + - 'Build and test' + types: ['requested'] + +jobs: + cancel-duplicate-workflow-runs: + name: "Cancel duplicate workflow runs" + runs-on: ubuntu-latest + steps: + - uses: potiuk/cancel-workflow-runs@953e057dc81d3458935a18d1184c386b0f6b5738 # @master + name: "Cancel duplicate workflow runs" + with: + cancelMode: allDuplicates + token: ${{ secrets.GITHUB_TOKEN }} + sourceRunId: ${{ github.event.workflow_run.id }}