fix: Improve proxy configuration handling in setup action
Some checks failed
Run Tests / e2e tests (push) Failing after 20s
Run Tests / lint tests (push) Failing after 21s
Run Tests / unit tests (push) Failing after 22s

This commit is contained in:
2025-10-27 16:47:59 +01:00
parent a861efeabf
commit 7d0c8bfc53

View File

@@ -44,10 +44,13 @@ runs:
echo "HTTP_PROXY=${PROXY_HOST}" echo "HTTP_PROXY=${PROXY_HOST}"
echo "HTTPS_PROXY=${PROXY_HOST}" echo "HTTPS_PROXY=${PROXY_HOST}"
} >> "$GITHUB_ENV" } >> "$GITHUB_ENV"
sudo tee /etc/apt/apt.conf.d/01proxy >/dev/null <<EOF if command -v sudo >/dev/null 2>&1; then
Acquire::http::Proxy "${PROXY_HOST}"; printf 'Acquire::http::Proxy "%s";\nAcquire::https::Proxy "%s";\n' "${PROXY_HOST}" "${PROXY_HOST}" | sudo tee /etc/apt/apt.conf.d/01proxy >/dev/null
Acquire::https::Proxy "${PROXY_HOST}"; elif [ "$(id -u)" -eq 0 ]; then
EOF printf 'Acquire::http::Proxy "%s";\nAcquire::https::Proxy "%s";\n' "${PROXY_HOST}" "${PROXY_HOST}" > /etc/apt/apt.conf.d/01proxy
else
echo "Skipping /etc/apt/apt.conf.d/01proxy update; sudo/root not available" >&2
fi
- name: Install dependencies - name: Install dependencies
shell: bash shell: bash
run: | run: |