Cancel duplicate workflows #113
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@3d86a7cc43670094ac248017207be0295edbc31d # 0.8.0 | |
with: | |
workflow_id: ${{ github.event.workflow.id }} |