From b086743247104970ef4ba9a7c71523fce5d3645a Mon Sep 17 00:00:00 2001 From: uazo <29201891+uazo@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:58:43 +0100 Subject: [PATCH] Update build-images.yaml --- .github/workflows/build-images.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index 9b3faf5e..87032bb5 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -45,6 +45,17 @@ jobs: powershell sudo apt-get autoremove + - name: Enable proxy on container + shell: bash + if: ${{ github.event.inputs.type != 'ubuntu-latest' }} + run: | + if ! [[ -z "${HTTP_PROXY}" ]]; then + PROXY_ADDR=http://$(hostname -I | cut -d' ' -f1 | xargs):8118 + echo "PROXY_ADDR=$PROXY_ADDR" >> $GITHUB_ENV + sudo iptables -D INPUT -p tcp -s localhost --dport 8118 -j ACCEPT + sudo iptables -D INPUT -p tcp --dport 8118 -j DROP + fi + - name: Checkout repo uses: actions/checkout@v2 with: