Skip to content

Update GitHub Actions workflow for Python setup #12

Update GitHub Actions workflow for Python setup

Update GitHub Actions workflow for Python setup #12

Workflow file for this run

name: test pip root user warning repro
on:
push:
jobs:
repro:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
options: --user root
steps:
- name: Ensure Sudo is Installed
run: |
if ! command -v sudo &> /dev/null; then
echo "sudo could not be found. Installing..."
apt-get update && apt-get install -y sudo
fi
- name: Install prerequisites
run: |
apt-get update
apt-get install -y curl ca-certificates git
- name: Check user
run: |
whoami
id -u
- name: Check ownership
run: ls -ld /github/home
# - name: Give all permissions to the current user
# run: sudo chmod -R 777 /github/home
- name: Change ownership of /github/home
run: sudo chown -R $(whoami) /github/home
- name: Check ownership
run: ls -ld /github/home
- name: Set up Python
# uses: actions/setup-python@v6
# uses: lmvysakh/setup-python@rootuser_warning_fix
uses: priyagupta108/setup-python@pip-root-user-warning
with:
python-version: '3.13.7'
- name: Show pip version
run: python -m pip --version