File tree Expand file tree Collapse file tree 6 files changed +47
-4
lines changed
Expand file tree Collapse file tree 6 files changed +47
-4
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,20 @@ name: BackportPR
44
55on :
66 workflow_dispatch :
7+ inputs :
8+ no_cache :
9+ description : Run without cache
10+ required : false
11+ type : boolean
12+ default : false
713 pull_request :
814 branches : ['2[1-9].[1-9][0-9]', '2[1-9].[1-9]']
915
1016env :
1117 # Force the stdout and stderr streams to be unbuffered
1218 PYTHONUNBUFFERED : 1
1319 DISABLE_CI_MERGE_COMMIT : ${{ vars.DISABLE_CI_MERGE_COMMIT || '0' }}
14- DISABLE_CI_CACHE : ${{ vars.DISABLE_CI_CACHE || '0' }}
20+ DISABLE_CI_CACHE : ${{ github.event.inputs.no_cache || '0' }}
1521 CHECKOUT_REF : ${{ vars.DISABLE_CI_MERGE_COMMIT == '1' && github.event.pull_request.head.sha || '' }}
1622 DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
1723 CLICKHOUSE_TEST_STAT_URL : ${{ secrets.CLICKHOUSE_TEST_STAT_URL }}
Original file line number Diff line number Diff line change @@ -4,12 +4,19 @@ name: MasterCI
44
55on :
66 workflow_dispatch :
7+ inputs :
8+ no_cache :
9+ description : Run without cache
10+ required : false
11+ type : boolean
12+ default : false
713 push :
814 branches : ['antalya', 'releases/*', 'antalya-*']
915
1016env :
1117 # Force the stdout and stderr streams to be unbuffered
1218 PYTHONUNBUFFERED : 1
19+ DISABLE_CI_CACHE : ${{ github.event.inputs.no_cache || '0' }}
1320 CHECKOUT_REF : " "
1421 DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
1522 CLICKHOUSE_TEST_STAT_URL : ${{ secrets.CLICKHOUSE_TEST_STAT_URL }}
Original file line number Diff line number Diff line change @@ -4,14 +4,20 @@ name: PR
44
55on :
66 workflow_dispatch :
7+ inputs :
8+ no_cache :
9+ description : Run without cache
10+ required : false
11+ type : boolean
12+ default : false
713 pull_request :
814 branches : ['antalya', 'releases/*', 'antalya-*']
915
1016env :
1117 # Force the stdout and stderr streams to be unbuffered
1218 PYTHONUNBUFFERED : 1
1319 DISABLE_CI_MERGE_COMMIT : ${{ vars.DISABLE_CI_MERGE_COMMIT || '0' }}
14- DISABLE_CI_CACHE : ${{ vars.DISABLE_CI_CACHE || '0' }}
20+ DISABLE_CI_CACHE : ${{ github.event.inputs.no_cache || '0' }}
1521 CHECKOUT_REF : ${{ vars.DISABLE_CI_MERGE_COMMIT == '1' && github.event.pull_request.head.sha || '' }}
1622 DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
1723 CLICKHOUSE_TEST_STAT_URL : ${{ secrets.CLICKHOUSE_TEST_STAT_URL }}
Original file line number Diff line number Diff line change @@ -4,12 +4,19 @@ name: ReleaseBranchCI
44
55on :
66 workflow_dispatch :
7+ inputs :
8+ no_cache :
9+ description : Run without cache
10+ required : false
11+ type : boolean
12+ default : false
713 push :
814 branches : ['2[1-9].[1-9][0-9]', '2[1-9].[1-9]']
915
1016env :
1117 # Force the stdout and stderr streams to be unbuffered
1218 PYTHONUNBUFFERED : 1
19+ DISABLE_CI_CACHE : ${{ github.event.inputs.no_cache || '0' }}
1320 CHECKOUT_REF : " "
1421 DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
1522 CLICKHOUSE_TEST_STAT_URL : ${{ secrets.CLICKHOUSE_TEST_STAT_URL }}
Original file line number Diff line number Diff line change @@ -360,7 +360,10 @@ def _check_db(workflow):
360360 )
361361 )
362362
363- pr_allows_cache = "[x] <!---no_ci_cache" not in Info ().pr_body
363+ pr_allows_cache = (
364+ "[x] <!---no_ci_cache" not in Info ().pr_body
365+ or os .environ .get ("DISABLE_CI_CACHE" , "0" ) not in ("1" , "true" )
366+ )
364367 if (
365368 workflow .enable_job_filtering_by_changes
366369 and results [- 1 ].is_ok ()
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ class Templates:
3636
3737on:
3838 workflow_dispatch:
39+ inputs:
40+ no_cache:
41+ description: Run without cache
42+ required: false
43+ type: boolean
44+ default: false
3945 {EVENT}:
4046 branches: [{BRANCHES}]
4147
@@ -55,8 +61,12 @@ class Templates:
5561 """
5662 TEMPLATE_ENV_CHECKOUT_REF_PR = """\
5763 DISABLE_CI_MERGE_COMMIT: ${{{{ vars.DISABLE_CI_MERGE_COMMIT || '0' }}}}
58- DISABLE_CI_CACHE: ${{{{ vars.DISABLE_CI_CACHE || '0' }}}}
64+ DISABLE_CI_CACHE: ${{{{ github.event.inputs.no_cache || '0' }}}}
5965 CHECKOUT_REF: ${{{{ vars.DISABLE_CI_MERGE_COMMIT == '1' && github.event.pull_request.head.sha || '' }}}}\
66+ """
67+ TEMPLATE_ENV_CHECKOUT_REF_PUSH = """\
68+ DISABLE_CI_CACHE: ${{{{ github.event.inputs.no_cache || '0' }}}}
69+ CHECKOUT_REF: ""\
6070 """
6171 TEMPLATE_ENV_CHECKOUT_REF_DEFAULT = """\
6272 CHECKOUT_REF: ""\
@@ -432,6 +442,10 @@ def generate(self):
432442 ENV_CHECKOUT_REFERENCE = (
433443 YamlGenerator .Templates .TEMPLATE_ENV_CHECKOUT_REF_PR
434444 )
445+ elif self .workflow_config .event in (Workflow .Event .PUSH ,):
446+ ENV_CHECKOUT_REFERENCE = (
447+ YamlGenerator .Templates .TEMPLATE_ENV_CHECKOUT_REF_PUSH
448+ )
435449 else :
436450 ENV_CHECKOUT_REFERENCE = (
437451 YamlGenerator .Templates .TEMPLATE_ENV_CHECKOUT_REF_DEFAULT
You can’t perform that action at this time.
0 commit comments