Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GHA] Pin fastcore to fix SyntaxError on get_images_to_build.py (#33674)

Wiktor Kobielad5f1d6a19393
diff --git a/.github/actions/handle_docker/get_images_to_build.py b/.github/actions/handle_docker/get_images_to_build.py
index 825b3a81fe2..3e437a35150 100644
--- a/.github/actions/handle_docker/get_images_to_build.py
+++ b/.github/actions/handle_docker/get_images_to_build.py
@@ -6,11 +6,21 @@ import json
import re
import sys
-from distutils.util import strtobool
from helpers import *
from images_api import *
+def str_to_bool(value):
+ """Convert string to boolean, replacing deprecated distutils.util.strtobool"""
+ value = value.lower()
+ if value in ('y', 'yes', 't', 'true', 'on', '1'):
+ return True
+ elif value in ('n', 'no', 'f', 'false', 'off', '0'):
+ return False
+ else:
+ raise ValueError(f"Invalid truth value: {value!r}")
+
+
def parse_args():
parser = argparse.ArgumentParser(description='Returns list of Docker images to build for a given workflow')
parser.add_argument('-i', '--images', required=True, help='Comma-separated docker images')
@@ -23,9 +33,9 @@ def parse_args():
parser.add_argument('--base_tag_file', default=None, required=False, help='Base docker tag file path')
parser.add_argument('--ref_name', required=False, default='', help='GitHub ref name')
parser.add_argument('--repo', default='openvinotoolkit/openvino', help='GitHub repository')
- parser.add_argument('--docker_env_changed', type=lambda x: bool(strtobool(x)), default=True,
+ parser.add_argument('--docker_env_changed', type=lambda x: bool(str_to_bool(x)), default=True,
help='Whether PR changes docker env')
- parser.add_argument('--dockerfiles_changed', type=lambda x: bool(strtobool(x)), default=True,
+ parser.add_argument('--dockerfiles_changed', type=lambda x: bool(str_to_bool(x)), default=True,
help='Whether PR changes dockerfiles')
parser.add_argument('--action_path', default='.github/actions/handle_docker', help='Path to this GitHub action')
parser.add_argument('--push', action='store_true', required=False, help='Whether to push images to registry')
diff --git a/.github/actions/handle_docker/requirements.txt b/.github/actions/handle_docker/requirements.txt
index fb66705c377..d0ad8065202 100644
--- a/.github/actions/handle_docker/requirements.txt
+++ b/.github/actions/handle_docker/requirements.txt
@@ -1 +1,3 @@
-ghapi==1.0.4
+ghapi==1.0.9
+# pin fastcore CVS-179495
+fastcore==1.12.1
\ No newline at end of file
diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tag
index a35ef81f102..31a02d82bb5 100644
--- a/.github/dockerfiles/docker_tag
+++ b/.github/dockerfiles/docker_tag
@@ -1 +1 @@
-pr-33079
+pr-33674