cancel.yml 391 B

123456789101112131415161718
  1. name: Cancel
  2. on:
  3. workflow_run:
  4. workflows: ["CI"]
  5. types:
  6. - requested
  7. permissions:
  8. contents: read
  9. jobs:
  10. cancel:
  11. permissions:
  12. actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: styfle/cancel-workflow-action@0.12.0
  16. with:
  17. workflow_id: ${{ github.event.workflow.id }}