diff --git a/.github/workflows/cancel_workflows.yml b/.github/workflows/cancel_workflows.yml new file mode 100644 index 00000000000..050398a3726 --- /dev/null +++ b/.github/workflows/cancel_workflows.yml @@ -0,0 +1,15 @@ +name: Cancel Workflows +on: + workflow_run: + workflows: ["Go", "Golicense", "Kind", "Build and push latest image if needed", "Antrea upgrade"] + types: + - requested +jobs: + cancel: + name: Cancel workflows + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.event == 'pull_request' }} + steps: + - uses: styfle/cancel-workflow-action@0.9.0 + with: + workflow_id: ${{ github.event.workflow.id }}