Skip to content

Commit

Permalink
account for sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
akashchi committed Jan 29, 2024
1 parent 1788f12 commit a4d96ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/job_pytorch_models_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/job_tensorflow_hub_models_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a4d96ac

Please sign in to comment.