Set other proxy env vars

This commit is contained in:
Michael B. Gale
2026-07-22 07:26:00 +01:00
parent 84ae30d972
commit a2bfb64790
2 changed files with 20 additions and 2 deletions

11
.github/workflows/__global-proxy.yml generated vendored
View File

@@ -73,13 +73,22 @@ jobs:
iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset
iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset
echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy" echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy"
- name: Set proxy environment variables
shell: bash
run: |
echo "http_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
echo "HTTP_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
echo "https_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
echo "HTTPS_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze - uses: ./../action/analyze
env: env:
https_proxy: http://squid-proxy:3128
CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true
CODEQL_ACTION_TEST_MODE: true CODEQL_ACTION_TEST_MODE: true
container: container:

View File

@@ -12,7 +12,6 @@ services:
ports: ports:
- 3128:3128 - 3128:3128
env: env:
https_proxy: http://squid-proxy:3128
CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true CODEQL_ACTION_TOLERATE_MISSING_GIT_VERSION: true
steps: steps:
- name: Block direct internet access to force proxy usage - name: Block direct internet access to force proxy usage
@@ -33,8 +32,18 @@ steps:
iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset iptables -A OUTPUT -p tcp --dport 80 -j REJECT --reject-with tcp-reset
iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset iptables -A OUTPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset
echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy" echo "Direct HTTP/HTTPS access is now blocked - all traffic must go through the proxy"
- name: Set proxy environment variables
shell: bash
run: |
echo "http_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
echo "HTTP_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
echo "https_proxy=http://squid-proxy:3128" >> $GITHUB_ENV
echo "HTTPS_PROXY=http://squid-proxy:3128" >> $GITHUB_ENV
- uses: ./../action/init - uses: ./../action/init
with: with:
languages: javascript languages: javascript
tools: ${{ steps.prepare-test.outputs.tools-url }} tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/analyze - uses: ./../action/analyze