Skip to content

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

[GHA] Keep both main and mirror APT sources for Debian Packages job (#37511)

Alina Kladieva73cb8064f12f
diff --git a/.github/workflows/job_debian_packages.yml b/.github/workflows/job_debian_packages.yml
index 32e2c0f7236..339011a5e35 100644
--- a/.github/workflows/job_debian_packages.yml
+++ b/.github/workflows/job_debian_packages.yml
@@ -37,10 +37,13 @@ jobs:
- name: Switch Ubuntu APT sources to Azure mirrors
if: runner.os == 'Linux'
run: |
- # compatible with both Ubuntu 22.04 and 24.04, which have different formats of sources.list files
- touch /etc/apt/sources.list.d/ubuntu.sources
- sed -i -E 's|http://(archive\|security).ubuntu.com/ubuntu|http://azure.archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list
- sed -i -E 's|http://(archive\|security).ubuntu.com/ubuntu|http://azure.archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list.d/ubuntu.sources
+ # compatible with both Ubuntu 22.04 and 24.04; sources.list is read by apt on both versions
+ . /etc/os-release
+ cat >> /etc/apt/sources.list << EOF
+ deb http://azure.archive.ubuntu.com/ubuntu $VERSION_CODENAME main restricted universe multiverse
+ deb http://azure.archive.ubuntu.com/ubuntu ${VERSION_CODENAME}-updates main restricted universe multiverse
+ deb http://azure.archive.ubuntu.com/ubuntu ${VERSION_CODENAME}-security main restricted universe multiverse
+ EOF
- name: Download OpenVINO debian packages
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main