diff --git a/.github/workflows/job_pytorch_models_tests.yml b/.github/workflows/job_pytorch_models_tests.yml index 9bd6bb92be9192..fd80ef0ac6a927 100644 --- a/.github/workflows/job_pytorch_models_tests.yml +++ b/.github/workflows/job_pytorch_models_tests.yml @@ -33,13 +33,18 @@ jobs: INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests steps: - - name: Set apt retries - run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries - - name: Check sudo if: ${{ runner.os == 'Linux' }} run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi + - name: Set apt retries + run: | + if [ "$(id -u)" -eq 0 ]; then + echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries + else + sudo echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries + fi + - name: Download OpenVINO package uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/job_tensorflow_hub_models_tests.yml b/.github/workflows/job_tensorflow_hub_models_tests.yml index 081c352b048a6e..7fc4d3c71c6a5a 100644 --- a/.github/workflows/job_tensorflow_hub_models_tests.yml +++ b/.github/workflows/job_tensorflow_hub_models_tests.yml @@ -33,13 +33,18 @@ jobs: INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests steps: - - name: Set apt retries - run: echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries - - name: Check sudo if: ${{ runner.os == 'Linux' }} run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi + - name: Set apt retries + run: | + if [ "$(id -u)" -eq 0 ]; then + echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries + else + sudo echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries + fi + - name: Download OpenVINO package uses: actions/download-artifact@v3 with: