-
Notifications
You must be signed in to change notification settings - Fork 352
feat: update DIFC proxying to also proxy actions/github-script #22712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,4 +27,16 @@ fi | |||||||||||||||
| if [ "${GH_HOST:-}" = "localhost:18443" ]; then | ||||||||||||||||
| echo "GH_HOST=" >> "$GITHUB_ENV" | ||||||||||||||||
| fi | ||||||||||||||||
|
|
||||||||||||||||
| # Restore GITHUB_API_URL and GITHUB_GRAPHQL_URL to their original values. | ||||||||||||||||
| if [ "${GITHUB_API_URL:-}" = "https://localhost:18443/api/v3" ]; then | ||||||||||||||||
| echo "GITHUB_API_URL=${GH_AW_ORIGINAL_GITHUB_API_URL:-}" >> "$GITHUB_ENV" | ||||||||||||||||
| fi | ||||||||||||||||
| if [ "${GITHUB_GRAPHQL_URL:-}" = "https://localhost:18443/api/graphql" ]; then | ||||||||||||||||
| echo "GITHUB_GRAPHQL_URL=${GH_AW_ORIGINAL_GITHUB_GRAPHQL_URL:-}" >> "$GITHUB_ENV" | ||||||||||||||||
| fi | ||||||||||||||||
|
|
||||||||||||||||
| # Clear the Node.js CA certs override set by start_difc_proxy.sh. | ||||||||||||||||
| echo "NODE_EXTRA_CA_CERTS=" >> "$GITHUB_ENV" | ||||||||||||||||
|
Comment on lines
+39
to
+40
|
||||||||||||||||
| # Clear the Node.js CA certs override set by start_difc_proxy.sh. | |
| echo "NODE_EXTRA_CA_CERTS=" >> "$GITHUB_ENV" | |
| # Restore the Node.js CA certs override only if it was set to the DIFC proxy CA | |
| # certificate. This preserves any pre-existing NODE_EXTRA_CA_CERTS value in the job. | |
| if [ "${NODE_EXTRA_CA_CERTS:-}" = "$DIFC_PROXY_CA_CERT" ]; then | |
| echo "NODE_EXTRA_CA_CERTS=${GH_AW_ORIGINAL_NODE_EXTRA_CA_CERTS:-}" >> "$GITHUB_ENV" | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start_difc_proxy.sh now overrides GH_HOST and NODE_EXTRA_CA_CERTS but only saves/restores the original values for GITHUB_API_URL/GITHUB_GRAPHQL_URL. If the runner/job already had GH_HOST (e.g., GitHub Enterprise) or NODE_EXTRA_CA_CERTS set, stopping the proxy will currently clear them rather than restoring the prior values. Consider saving the originals (e.g., to GH_AW_ORIGINAL_GH_HOST and GH_AW_ORIGINAL_NODE_EXTRA_CA_CERTS) alongside the existing GH_AW_ORIGINAL_* vars so stop_difc_proxy.sh can restore them.