Skip to content

Commit e1c9231

Browse files
authored
Update GitHub Actions workflow to ensure sudo installation
Added a step to ensure sudo is installed and modified cache clearing steps.
1 parent 2e40d5d commit e1c9231

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

.github/workflows/testing1087.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,26 @@ jobs:
4141

4242
steps:
4343
- uses: actions/checkout@v6
44-
- name: Install required tools
44+
- uses: actions/checkout@v6
45+
46+
- name: Ensure Sudo is Installed
47+
run: |
48+
if ! command -v sudo &> /dev/null; then
49+
echo "sudo could not be found. Installing..."
50+
apt-get update && apt-get install -y sudo
51+
fi
52+
- name: Fix pip cache permissions
53+
run: sudo chown -R $(whoami) /github/home
54+
# - name: Clear cache
55+
# run: |
56+
# rm -rf "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
57+
# mkdir -p "${{ runner.tool_cache }}"
58+
- name: Clear tool cache
4559
run: |
46-
apt-get update
47-
apt-get install -y curl git ca-certificates tar bash
60+
rm -rf /__w/_tool/Python
61+
echo "Verify cleared:"
62+
ls -la /__w/_tool/
63+
4864

4965
- name: Setup Python 3.8
5066
uses: actions/setup-python@v5

0 commit comments

Comments
 (0)