OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[GHA] Avoid running actions in forks (#26749)
Alina Kladievaa17efa6f20ec
diff --git a/.github/actions/smart-ci/action.yml b/.github/actions/smart-ci/action.ymlindex 007db90d132..cd111d617dd 100644--- a/.github/actions/smart-ci/action.yml+++ b/.github/actions/smart-ci/action.yml@@ -43,6 +43,10 @@ inputs:description: "Comma-separated list of patterns (fnmatch-style). If PR has only matching files changed,return indicator that CI can be skipped"required: false+ enable_for_org:+ description: "Enables running workflows for a given organization; triggers from other orgs are skipped"+ required: false+ default: "openvinotoolkit"outputs:all_components:@@ -99,6 +103,7 @@ runs:-c "${{ inputs.components_config }}" \-m "${{ inputs.components_config_schema }}" \-l "${{ inputs.labeler_config }}" \+ --enable_for_org "${{ inputs.enable_for_org }}" \--skip-when-only-listed-labels-set "${{ inputs.skip_when_only_listed_labels_set }}" \--skip-when-only-listed-files-changed "${{ inputs.skip_when_only_listed_files_changed }}"shell: bashdiff --git a/.github/actions/smart-ci/smart_ci.py b/.github/actions/smart-ci/smart_ci.pyindex 1c8558f4779..e922d3d2ef5 100644--- a/.github/actions/smart-ci/smart_ci.py+++ b/.github/actions/smart-ci/smart_ci.py@@ -4,6 +4,8 @@import osimport reimport argparse+import sys+import yamlimport jsonimport jsonschema@@ -146,6 +148,8 @@ def parse_args():parser.add_argument('--skip-when-only-listed-files-changed',help="Comma-separated list of patterns (fnmatch-style). If PR has only matching files changed, ""return indicator that CI can be skipped")+ parser.add_argument('--enable_for_org', default='openvinotoolkit',+ help='Enable running workflows for a given organization; triggers from other orgs are skipped')args = parser.parse_args()return args@@ -176,6 +180,13 @@ def main():components_config = yaml.safe_load(config)owner, repository = args.repo.split('/')++ if owner != args.enable_for_org:+ logger.info(f"Running workflows is enabled only for repos in {args.enable_for_org} organization. "+ f"The current workflow was initiated from other org: {owner}, skipping")+ set_github_output("skip_workflow", "True")+ sys.exit(0)+gh_api = GhApi(owner=owner, repo=repository, token=os.getenv("GITHUB_TOKEN"))pr = gh_api.pulls.get(args.pr) if args.pr else Nonediff --git a/.github/workflows/android_arm64.yml b/.github/workflows/android_arm64.ymlindex 35c18b43e1f..bbd737dff0e 100644--- a/.github/workflows/android_arm64.yml+++ b/.github/workflows/android_arm64.yml@@ -43,6 +43,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-4-cores-16gb-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -95,7 +96,6 @@ jobs:VCPKG_DEFAULT_BINARY_CACHE: '/mount/caches/ccache/android_arm64/vcpkg_cache'VCPKG_FORCE_SYSTEM_BINARIES: '1'SCCACHE_AZURE_KEY_PREFIX: android_arm64- if: "!needs.smart_ci.outputs.skip_workflow"steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/android_x64.yml b/.github/workflows/android_x64.ymlindex e8fb4902e37..3504b8cf2fd 100644--- a/.github/workflows/android_x64.yml+++ b/.github/workflows/android_x64.yml@@ -46,6 +46,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-4-cores-16gb-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -94,7 +95,6 @@ jobs:ANDROID_SDK_VERSION: 29ANDROID_ABI_CONFIG: x86_64SCCACHE_AZURE_KEY_PREFIX: android_x64- if: "!needs.smart_ci.outputs.skip_workflow"steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/assign_issue.yml b/.github/workflows/assign_issue.ymlindex f466715f5cf..b13c6736e27 100644--- a/.github/workflows/assign_issue.yml+++ b/.github/workflows/assign_issue.yml@@ -15,6 +15,7 @@ jobs:permissions:issues: writetimeout-minutes: 10+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- name: take an issueuses: bdougie/take-action@1439165ac45a7461c2d89a59952cd7d941964b87 # v1.6.1diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.ymlindex 7b380530cfa..d6d3a63e431 100644--- a/.github/workflows/build_doc.yml+++ b/.github/workflows/build_doc.yml@@ -15,6 +15,7 @@ permissions: read-alljobs:Build_Doc:runs-on: ubuntu-20.04+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/check_pr_commits.yml b/.github/workflows/check_pr_commits.ymlindex 75d18695c6e..690b85046a1 100644--- a/.github/workflows/check_pr_commits.yml+++ b/.github/workflows/check_pr_commits.yml@@ -6,6 +6,7 @@ permissions: read-alljobs:Checks:runs-on: ubuntu-22.04+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/cleanup_caches.yml b/.github/workflows/cleanup_caches.ymlindex 6ba1a4164d9..9c3992e2a85 100644--- a/.github/workflows/cleanup_caches.yml+++ b/.github/workflows/cleanup_caches.yml@@ -10,6 +10,7 @@ permissions: read-alljobs:Cleanup_PIP:runs-on: aks-linux-2-cores-8gb+ if: ${{ github.repository_owner == 'openvinotoolkit' }}container:image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04volumes:@@ -35,6 +36,7 @@ jobs:Cleanup_CCACHE:runs-on: aks-linux-2-cores-8gb+ if: ${{ github.repository_owner == 'openvinotoolkit' }}container:image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04volumes:diff --git a/.github/workflows/code_snippets.yml b/.github/workflows/code_snippets.ymlindex ae5f9ee2562..82daec9ee79 100644--- a/.github/workflows/code_snippets.yml+++ b/.github/workflows/code_snippets.yml@@ -25,6 +25,7 @@ jobs:matrix:os: ['ubuntu-22.04', 'macos-latest', 'windows-latest']runs-on: ${{ matrix.os }}+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.ymlindex 2fbcc6b5f87..c2db68edca3 100644--- a/.github/workflows/code_style.yml+++ b/.github/workflows/code_style.yml@@ -12,6 +12,7 @@ jobs:runs-on: ubuntu-22.04permissions:pull-requests: write+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7with:diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.ymlindex 1d2f8e3ff54..0de4cb045bf 100644--- a/.github/workflows/coverity.yml+++ b/.github/workflows/coverity.yml@@ -31,6 +31,7 @@ jobs:run:shell: bashruns-on: aks-linux-16-cores-32gb+ if: ${{ github.repository_owner == 'openvinotoolkit' }}container:image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04env:diff --git a/.github/workflows/debian_10_arm.yml b/.github/workflows/debian_10_arm.ymlindex 84496a50b9a..7fab775b45b 100644--- a/.github/workflows/debian_10_arm.yml+++ b/.github/workflows/debian_10_arm.yml@@ -48,6 +48,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-16-cores-arm-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2diff --git a/.github/workflows/dependency_review.yml b/.github/workflows/dependency_review.ymlindex fd2d4f02d57..e73acd765ed 100644--- a/.github/workflows/dependency_review.yml+++ b/.github/workflows/dependency_review.yml@@ -6,6 +6,7 @@ permissions: read-alljobs:dependency-review:runs-on: ubuntu-latest+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/fedora_29.yml b/.github/workflows/fedora_29.ymlindex a79b0f86af2..b3a540fb287 100644--- a/.github/workflows/fedora_29.yml+++ b/.github/workflows/fedora_29.yml@@ -48,6 +48,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-4-cores-16gb-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -71,7 +72,6 @@ jobs:Build:needs: [Docker, Smart_CI]- if: "!needs.smart_ci.outputs.skip_workflow"uses: ./.github/workflows/job_build_linux.ymlwith:runner: 'aks-linux-16-cores-32gb'diff --git a/.github/workflows/files_size.yml b/.github/workflows/files_size.ymlindex 065fe71bc75..6a006cc7d4a 100644--- a/.github/workflows/files_size.yml+++ b/.github/workflows/files_size.yml@@ -10,6 +10,7 @@ permissions: read-alljobs:Check_Files_Size:runs-on: ubuntu-22.04+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/linux_arm64.yml b/.github/workflows/linux_arm64.ymlindex 7c0282b5519..2e557ebc5ef 100644--- a/.github/workflows/linux_arm64.yml+++ b/.github/workflows/linux_arm64.yml@@ -52,6 +52,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-16-cores-arm-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -75,7 +76,6 @@ jobs:Build:needs: [ Docker, Smart_CI ]- if: "!needs.smart_ci.outputs.skip_workflow"uses: ./.github/workflows/job_build_linux.ymlwith:runner: 'aks-linux-16-cores-arm'diff --git a/.github/workflows/linux_conditional_compilation.yml b/.github/workflows/linux_conditional_compilation.ymlindex f0ce141e8c0..f9359e323d4 100644--- a/.github/workflows/linux_conditional_compilation.yml+++ b/.github/workflows/linux_conditional_compilation.yml@@ -53,6 +53,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-4-cores-16gb-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -104,7 +105,7 @@ jobs:SELECTIVE_BUILD_STAT_DIR: /__w/openvino/openvino/selective_build_statMODELS_PATH: /__w/openvino/openvino/testdataSCCACHE_AZURE_KEY_PREFIX: ubuntu22_x86_64_itt_clang_Release_faster_build- if: ${{ !needs.smart_ci.outputs.skip_workflow && github.event_name != 'merge_group' }}+ if: ${{ github.event_name != 'merge_group' }}steps:- name: Clone OpenVINOdiff --git a/.github/workflows/linux_riscv.yml b/.github/workflows/linux_riscv.ymlindex 6c26bb8b385..3de8b56ad77 100644--- a/.github/workflows/linux_riscv.yml+++ b/.github/workflows/linux_riscv.yml@@ -44,6 +44,7 @@ jobs:Docker:needs: Smart_CIruns-on: aks-linux-4-cores-16gb-docker-build+ if: "!needs.smart_ci.outputs.skip_workflow"container:image: openvinogithubactions.azurecr.io/docker_build:0.2volumes:@@ -88,7 +89,7 @@ jobs:CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_tempCCACHE_MAXSIZE: 2G- if: ${{ !needs.smart_ci.outputs.skip_workflow && github.event_name != 'merge_group' }}+ if: ${{ github.event_name != 'merge_group' }}steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/linux_sanitizers.yml b/.github/workflows/linux_sanitizers.ymlindex 9105b3b00bf..367fce8eb98 100644--- a/.github/workflows/linux_sanitizers.yml+++ b/.github/workflows/linux_sanitizers.yml@@ -25,6 +25,7 @@ jobs:run:shell: bashruns-on: aks-linux-16-cores-32gb+ if: ${{ github.repository_owner == 'openvinotoolkit' }}container:image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04volumes:diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.ymlindex 715380811d6..d60ef460809 100644--- a/.github/workflows/mac.yml+++ b/.github/workflows/mac.yml@@ -78,6 +78,7 @@ jobs:INSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/jsINSTALL_TEST_DIR: ${{ github.workspace }}/tests_installBUILD_DIR: ${{ github.workspace }}/build+ if: "!needs.smart_ci.outputs.skip_workflow"steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/mac_arm64.yml b/.github/workflows/mac_arm64.ymlindex 2615fe16316..73890d12842 100644--- a/.github/workflows/mac_arm64.yml+++ b/.github/workflows/mac_arm64.yml@@ -78,6 +78,7 @@ jobs:INSTALL_DIR_JS: ${{ github.workspace }}/openvino_install/jsINSTALL_TEST_DIR: ${{ github.workspace }}/tests_installBUILD_DIR: ${{ github.workspace }}/build+ if: "!needs.smart_ci.outputs.skip_workflow"steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/mo.yml b/.github/workflows/mo.ymlindex 7bbf3ba2800..9a112e7e53c 100644--- a/.github/workflows/mo.yml+++ b/.github/workflows/mo.yml@@ -21,6 +21,7 @@ permissions: read-alljobs:Pylint-UT:runs-on: ubuntu-22.04+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/ovc.yml b/.github/workflows/ovc.ymlindex a296f93e5a5..1e2668f26cb 100644--- a/.github/workflows/ovc.yml+++ b/.github/workflows/ovc.yml@@ -16,6 +16,7 @@ permissions: read-alljobs:Pylint-UT:runs-on: ubuntu-22.04+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/py_checks.yml b/.github/workflows/py_checks.ymlindex db0918d0eb6..75a8a1b83f0 100644--- a/.github/workflows/py_checks.yml+++ b/.github/workflows/py_checks.yml@@ -25,6 +25,7 @@ permissions: read-alljobs:linters:runs-on: ubuntu-20.04+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/send_workflows_to_opentelemetry.yml b/.github/workflows/send_workflows_to_opentelemetry.ymlindex 8f70389e645..ef597e55858 100644--- a/.github/workflows/send_workflows_to_opentelemetry.yml+++ b/.github/workflows/send_workflows_to_opentelemetry.yml@@ -37,7 +37,7 @@ jobs:otel-export-trace:name: Export finished workflow metricsruns-on: aks-linux-2-cores-8gb- if: github.repository == 'openvinotoolkit/openvino'+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- name: Checkoutdiff --git a/.github/workflows/stale_prs_and_issues.yml b/.github/workflows/stale_prs_and_issues.ymlindex 395fc6a350e..d246a7e83f4 100644--- a/.github/workflows/stale_prs_and_issues.yml+++ b/.github/workflows/stale_prs_and_issues.yml@@ -12,6 +12,7 @@ jobs:issues: writepull-requests: writeruns-on: ubuntu-latest+ if: ${{ github.repository_owner == 'openvinotoolkit' }}steps:- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0with:diff --git a/.github/workflows/ubuntu_20.yml b/.github/workflows/ubuntu_20.ymlindex 5d74284b8c1..df1450a98e4 100644--- a/.github/workflows/ubuntu_20.yml+++ b/.github/workflows/ubuntu_20.yml@@ -54,6 +54,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-4-cores-16gb-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -77,7 +78,6 @@ jobs:Build:needs: [Docker, Smart_CI]- if: "!needs.smart_ci.outputs.skip_workflow"uses: ./.github/workflows/job_build_linux.ymlwith:runner: 'aks-linux-16-cores-32gb'diff --git a/.github/workflows/ubuntu_22.yml b/.github/workflows/ubuntu_22.ymlindex b2a2f78410e..90618357b2c 100644--- a/.github/workflows/ubuntu_22.yml+++ b/.github/workflows/ubuntu_22.yml@@ -56,6 +56,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-4-cores-16gb-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -80,7 +81,6 @@ jobs:Build:needs: [Docker, Smart_CI]- if: "!needs.smart_ci.outputs.skip_workflow"uses: ./.github/workflows/job_build_linux.ymlwith:runner: 'aks-linux-16-cores-32gb'diff --git a/.github/workflows/ubuntu_22_dpcpp.yml b/.github/workflows/ubuntu_22_dpcpp.ymlindex 1a5c69f03fe..1ee9df0095f 100644--- a/.github/workflows/ubuntu_22_dpcpp.yml+++ b/.github/workflows/ubuntu_22_dpcpp.yml@@ -44,6 +44,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-4-cores-16gb-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -66,7 +67,6 @@ jobs:Build:needs: [Docker, Smart_CI]- if: "!needs.smart_ci.outputs.skip_workflow"uses: ./.github/workflows/job_build_linux.ymlwith:runner: 'aks-linux-16-cores-32gb'diff --git a/.github/workflows/ubuntu_24.yml b/.github/workflows/ubuntu_24.ymlindex a0e1b314391..474e8a46ae5 100644--- a/.github/workflows/ubuntu_24.yml+++ b/.github/workflows/ubuntu_24.yml@@ -51,6 +51,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-4-cores-16gb-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -74,7 +75,6 @@ jobs:Build:needs: [Docker, Smart_CI]- if: "!needs.smart_ci.outputs.skip_workflow"uses: ./.github/workflows/job_build_linux.ymlwith:runner: 'aks-linux-16-cores-32gb'diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.ymlindex 902fb0dfcb0..a4a1a17af9d 100644--- a/.github/workflows/webassembly.yml+++ b/.github/workflows/webassembly.yml@@ -48,6 +48,7 @@ jobs:Docker:needs: Smart_CI+ if: "!needs.smart_ci.outputs.skip_workflow"runs-on: aks-linux-4-cores-16gb-docker-buildcontainer:image: openvinogithubactions.azurecr.io/docker_build:0.2@@ -88,7 +89,6 @@ jobs:OPENVINO_REPO: /__w/openvino/openvino/openvinoOPENVINO_BUILD_DIR: /__w/openvino/openvino/openvino_buildSCCACHE_AZURE_KEY_PREFIX: webassembly_Release- if: "!needs.smart_ci.outputs.skip_workflow"steps:- name: Clone OpenVINOuses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7diff --git a/.github/workflows/workflow_rerunner.yml b/.github/workflows/workflow_rerunner.ymlindex 81af7aede70..1c193f35dfa 100644--- a/.github/workflows/workflow_rerunner.yml+++ b/.github/workflows/workflow_rerunner.yml@@ -21,7 +21,8 @@ permissions: read-alljobs:rerun:name: Rerun Workflow- if: ${{ github.event.workflow_run.conclusion == 'failure' }} # Run only for the failed workflows+ # Run only for the failed workflows in openvinotoolkit org+ if: ${{ github.event.workflow_run.conclusion == 'failure' && github.repository_owner == 'openvinotoolkit' }}runs-on: aks-linux-2-cores-8gbpermissions:actions: write