Skip to content

Cancel workflow runs #10735

Cancel workflow runs

Cancel workflow runs #10735

name: "Cancel workflow runs"
on:
workflow_run:
workflows:
- "GLPI CI"
- "GLPI test code coverage"
types:
- requested
jobs:
cancel:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
runs-on: "${{ github.repository == 'glpi-network/glpi' && 'self-hosted' || 'ubuntu-latest' }}"
steps:
- name: "Cancel outdated workflow runs"
uses: "styfle/cancel-workflow-action@0.11.0"
with:
all_but_latest: true
workflow_id: ${{ github.event.workflow.id }}