Cancel duplicate workflows #144
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 duplicate workflows | |
on: | |
workflow_run: | |
workflows: ["CI", "Daily cron", "Weekly cron", "Check PR change log"] | |
types: | |
- requested | |
# Note: This has to be in workflow_run so it works for PRs from forks. | |
jobs: | |
cancel: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1 | |
with: | |
workflow_id: ${{ github.event.workflow.id }} |