@@ -15,15 +15,17 @@ jobs:
15
15
create-runner :
16
16
uses : ./.github/workflows/create_runner.yml
17
17
secrets : inherit
18
+ concurrency :
19
+ group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-create-runner
20
+ cancel-in-progress : false
18
21
19
22
configuration :
20
23
name : Configure job parameters
21
24
runs-on : ${{ needs.create-runner.outputs.label }}
22
25
needs : [create-runner]
23
26
concurrency :
24
- # github.head_ref is set by a pull_request event - contains the name of the source branch of the PR
25
- # github.ref_name is set if the event is NOT a pull_request - it contains only the branch name.
26
- group : ${{ github.head_ref || github.ref_name }}-configuration
27
+ group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-configuration
28
+ cancel-in-progress : true
27
29
outputs :
28
30
is_main_branch : ${{ (github.head_ref || github.ref) == 'refs/heads/main' }}
29
31
version : ${{ steps.branches.outputs.sanitized-branch-name }}-gha.${{github.run_number}}
40
42
pr_no_diff_skip : ${{ steps.pr-diff.outputs.pr_no_diff_skip }}
41
43
with_werft : ${{ steps.output.outputs.with-werft }}
42
44
with_integration_tests : ${{ steps.output.outputs.with_integration_tests }}
45
+ with_monitoring : ${{ contains( steps.pr-details.outputs.pr_body, '[x] with-monitoring') }}
43
46
latest_ide_version : ${{ contains( steps.pr-details.outputs.pr_body, '[x] latest-ide-version=true') }}
44
47
leeway_cache_bucket : ${{ steps.output.outputs.leeway_cache_bucket }}
45
48
pr_number : ${{ steps.pr-details.outputs.number }}
87
90
(needs.configuration.outputs.preview_enable == 'true')
88
91
needs : [configuration, create-runner]
89
92
concurrency :
90
- group : ${{ github.workflow }}-${{ github.ref }}-build-previewctl
93
+ group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-build-previewctl
91
94
cancel-in-progress : ${{ needs.configuration.outputs.is_main_branch == 'false' }}
92
95
runs-on : ${{ needs.create-runner.outputs.label }}
93
96
container :
@@ -115,7 +118,7 @@ jobs:
115
118
(needs.configuration.outputs.is_main_branch != 'true')
116
119
runs-on : ${{ needs.create-runner.outputs.label }}
117
120
concurrency :
118
- group : ${{ github.head_ref || github.ref_name }}-infrastructure
121
+ group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-infrastructure
119
122
cancel-in-progress : true
120
123
steps :
121
124
- uses : actions/checkout@v3
@@ -135,9 +138,7 @@ jobs:
135
138
needs : [configuration, create-runner]
136
139
runs-on : ${{ needs.create-runner.outputs.label }}
137
140
concurrency :
138
- group : ${{ github.head_ref || github.ref_name }}-build-gitpod
139
- # For the main branch we always want the build job to run to completion
140
- # For other branches we only care about the "latest" version, so it is fine to cancel in-progress builds
141
+ group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-build-gitpod
141
142
cancel-in-progress : ${{ needs.configuration.outputs.is_main_branch == 'false' }}
142
143
services :
143
144
mysql :
@@ -329,8 +330,8 @@ jobs:
329
330
- create-runner
330
331
runs-on : ${{ needs.create-runner.outputs.label }}
331
332
concurrency :
332
- group : ${{ github.workflow }}-${{ github.ref }}-install
333
- cancel-in-progress : true
333
+ group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-install
334
+ cancel-in-progress : ${{ needs.configuration.outputs.is_main_branch == 'false' }}
334
335
steps :
335
336
- uses : actions/checkout@v3
336
337
- name : Deploy Gitpod to the preview environment
@@ -372,8 +373,9 @@ jobs:
372
373
name : " Install Monitoring Satellite"
373
374
needs : [infrastructure, build-previewctl, create-runner]
374
375
runs-on : ${{ needs.create-runner.outputs.label }}
376
+ if : needs.configuration.outputs.with_monitoring == 'true'
375
377
concurrency :
376
- group : ${{ github.workflow }}-${{ github.ref }}-monitoring
378
+ group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-monitoring
377
379
cancel-in-progress : true
378
380
steps :
379
381
- uses : actions/checkout@v3
@@ -398,7 +400,7 @@ jobs:
398
400
image : eu.gcr.io/gitpod-core-dev/dev/dev-environment:aledbf-new-dev-image-gha.13182
399
401
if : needs.configuration.outputs.with_integration_tests != ''
400
402
concurrency :
401
- group : ${{ github.workflow }}-${{ github.ref }}-integration-test
403
+ group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-integration-test
402
404
cancel-in-progress : true
403
405
steps :
404
406
- uses : actions/checkout@v3
@@ -444,3 +446,6 @@ jobs:
444
446
secrets : inherit
445
447
with :
446
448
runner-label : ${{ needs.create-runner.outputs.label }}
449
+ concurrency :
450
+ group : ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-delete-runner
451
+ cancel-in-progress : false
0 commit comments