Skip to content

GitHub Actions cache client rejects http:// ACTIONS_RESULTS_URL #1479

Description

@maciejb

request() in src/caching/github-actions-cache.ts always calls https.request(). If ACTIONS_RESULTS_URL is http://, Node throws before any connection is made:

TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"

GitHub-hosted runners serve the cache API over HTTPS, so this does not show up there. Some third-party runners rewrite ACTIONS_RESULTS_URL to an http:// cache proxy (we hit this on Depot). @actions/http-client already picks the transport from parsedUrl.protocol === 'https:'.

I have a small fix ready: choose http vs https from the URL scheme, and a fake-server test that speaks HTTP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions