1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/.github/workflows/cancel.yml
spaceface 61ed1d810f
ci: minor optimization in the cancel workflow (#10978)
before this we scheduled two additional workflows, one for each workflow.
This PR now schedules just one, which cancels both workflows by itself.
2021-07-27 21:49:18 +03:00

19 lines
712 B
YAML

name: Cancel previous workflows
on:
workflow_run:
workflows: ["Code CI"]
types:
- requested
jobs:
cancel-previous-workflows:
runs-on: ubuntu-latest
steps:
- uses: spaceface777/cancel-workflow-action@0.9.1
# don't cancel CI for commits pushed to vlang/v#master (if ci is still too slow, this can be removed safely)
if: ${{ github.event.workflow_run.head_repository.full_name != 'vlang/v' || github.event.workflow_run.head_branch != 'master' }}
with:
# workflow ids for `Code CI` and `Sanitized CI` (from https://api.github.com/repos/vlang/v/actions/workflows):
workflow_id: 4577,7940868 # the other workflows finish quickly - no need to skip them