-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (37 loc) · 1.09 KB
/
workflow-concurrency.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Workflow concurrency
on:
workflow_dispatch:
# define concurrency setting for this workflow only
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
concurrency: ${{ github.workflow }}
jobs:
slow1:
runs-on: ${{ vars.RUNNER_UBUNTU }}
env:
WAIT_TIME: 40
steps:
- name: Simulate slow processing 1.1
run: |
echo Waiting for ${WAIT_TIME} seconds
sleep ${WAIT_TIME}
echo Awake!
- name: Simulate slow processing 1.2
run: |
echo Waiting for ${WAIT_TIME} seconds
sleep ${WAIT_TIME}
echo Awake!
slow2:
runs-on: ${{ vars.RUNNER_UBUNTU }}
env:
WAIT_TIME: 50
steps:
- name: Simulate slow processing 2.1
run: |
echo Waiting for ${WAIT_TIME} seconds
sleep ${WAIT_TIME}
echo Awake!
- name: Simulate slow processing 2.2
run: |
echo Waiting for ${WAIT_TIME} seconds
sleep ${WAIT_TIME}
echo Awake!