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 }}