release-please-action
release-please-action copied to clipboard
Support running behind proxy
TL;DR
When running on self-hosted agents behind corporate proxy, this action simply does not work.
Detailed design
While release-please itself, nor any used library, directly support proxy, there is a library https://www.npmjs.com/package/global-agent, which seems to work pretty well (although more real-life tests are needed).
I suggest to use it, since it does not do anything on its own, unless enabled. By default, it uses GLOBAL_AGENT_* env variables, but specific proxy config can be reconfigured via GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE (overriding this directly in code).
My idea is putting this in main method:
import {bootstrap} from 'global-agent';
process.env.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE = 'RELEASE_PLEASE_';
bootstrap();
Proxy support would be then enabled by RELEASE_PLEASE_HTTP_PROXY env var, which can be easily pre-set on self-hosted runners. This would retain backward compatibility, while supporting proxied environment.
Additional information
I'm planning to do some real-life testing with this config by forking the action.