diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fa142b..892382e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,8 +56,14 @@ jobs: steps: - uses: actions/checkout@v4 + # Self-hosted act runners run as root in a container that has no sudo, + # while GitHub-hosted runners need it. Pick whichever exists. - name: Install protoc - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler + run: | + SUDO="" + if [ "$(id -u)" -ne 0 ]; then SUDO="sudo"; fi + $SUDO apt-get update + $SUDO apt-get install -y protobuf-compiler - uses: dtolnay/rust-toolchain@stable with: