From 72eb8b6722187d0641efdf35e22b1ac49ace739b Mon Sep 17 00:00:00 2001 From: uazo <29201891+uazo@users.noreply.github.com> Date: Mon, 17 Jan 2022 15:50:19 +0100 Subject: [PATCH] Update release.yaml --- .github/workflows/release.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 243ce4b..25fb1d9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -39,6 +39,7 @@ jobs: env: OUTPUTFILE: /storage/images/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}/apks/ChromePublic.apk APK: ${{ github.event.inputs.build }}_ChromePublic.apk + HTTPS_PROXY: $PROXY_ADDR steps: - name: Copy artifacts @@ -48,9 +49,21 @@ jobs: sudo chown runner ChromePublic.apk mv ChromePublic.apk $APK + - name: Enable proxy on container + shell: bash + 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: Release build ${{ github.event.inputs.build }}/${{ github.event.inputs.sha }} uses: softprops/action-gh-release@v1 with: draft: true body: Apk for ${{ env.APK }} sha ${{ github.event.inputs.sha }} files: ${{ env.APK }} + env: + HTTP_PROXY: ${{ env.PROXY_ADDR }}