Cancel workflow runs #12595
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected]" | |
with: | |
all_but_latest: true | |
workflow_id: ${{ github.event.workflow.id }} |