Skip to content

Commit 00d46e6

Browse files
authored
[GHA] Don't set CI_BUILD_DEV_TAG on release branches (#26312)
1 parent 123072f commit 00d46e6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/actions/create_manifest/create_manifest.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,12 @@ def generate_manifest(repos: list, product_type: str, event_type: str, build_typ
9999
custom_branch_name = f'-{trigger_repo.branch}' if trigger_repo.branch != 'master' else ''
100100
run_number_postfix = f'-{os.environ.get("GITHUB_RUN_NUMBER")}' if os.environ.get("GITHUB_RUN_NUMBER") else ''
101101
product_version = f"{ov_version}{run_number_postfix}-{trigger_repo.revision[:11]}{custom_branch_name}"
102-
ci_build_dev_tag = f'dev{trigger_repo.commit_time.strftime("%Y%m%d")}'
103-
wheel_product_version = f'{ov_version}.{ci_build_dev_tag}'
102+
103+
merge_queue_target_branch = next(iter(re.findall(f'^gh-readonly-queue/(.*)/', trigger_repo.branch)), None)
104+
target_branch = merge_queue_target_branch or trigger_repo.target_branch or trigger_repo.branch
105+
is_release_branch = re.match('^releases/.+$', target_branch)
106+
ci_build_dev_tag = f'dev{trigger_repo.commit_time.strftime("%Y%m%d")}' if not is_release_branch else ''
107+
wheel_product_version = f'{ov_version}.{ci_build_dev_tag}' if not is_release_branch else ov_version
104108

105109
set_github_output('CI_BUILD_NUMBER', product_version, 'GITHUB_ENV')
106110
set_github_output('CI_BUILD_DEV_TAG', ci_build_dev_tag, 'GITHUB_ENV')

0 commit comments

Comments
 (0)