Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actions/setup-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: riseproject-dev/setup-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 7 files changed
  • 1 contributor

Commits on Apr 5, 2026

  1. feat: Add mirror and mirror-token inputs for custom Python distri…

    …bution sources
    
    Users who need custom CPython builds (internal mirrors, GHES-hosted forks,
    special build configurations, compliance builds, air-gapped runners) could not
    previously point setup-python at anything other than actions/python-versions.
    
    Adds two new inputs:
    - `mirror`: base URL hosting versions-manifest.json and the Python
      distributions it references. Defaults to the existing
      https://raw.githubusercontent.com/actions/python-versions/main.
    - `mirror-token`: optional token used to authenticate requests to the mirror.
    
    If `mirror` is a raw.githubusercontent.com/{owner}/{repo}/{branch} URL, the
    manifest is fetched via the GitHub REST API (authenticated rate limit applies);
    otherwise the action falls back to a direct GET of {mirror}/versions-manifest.json.
    
    Token interaction
    -----------------
    
    `token` is never forwarded to arbitrary hosts. Auth resolution is per-URL:
    
      1. if mirror-token is set, use mirror-token
      2. else if token is set AND the target host is github.com,
         *.github.com, or *.githubusercontent.com, use token
      3. else send no auth
    
    Cases:
    
      Default (no inputs set)
        mirror = default raw.githubusercontent.com URL, mirror-token empty,
        token = github.token.
        → manifest API call and tarball downloads use `token`.
        Identical to prior behavior.
    
      Custom raw.githubusercontent.com mirror (e.g. personal fork)
        mirror-token empty, token = github.token.
        → manifest API call and tarball downloads use `token`
          (target hosts are GitHub-owned).
    
      Custom non-GitHub mirror, no mirror-token
        mirror-token empty, token = github.token.
        → manifest fetched via direct URL (no auth attached),
          tarball downloads use no auth.
        `token` is NOT forwarded to the custom host — this is the
        leak-prevention case.
    
      Custom non-GitHub mirror with mirror-token
        mirror-token set, token may be set.
        → manifest fetch and tarball downloads use `mirror-token`.
    
      Custom GitHub mirror with both tokens set
        mirror-token wins. Used for both the manifest API call and
        tarball downloads.
    luhenry committed Apr 5, 2026
    Configuration menu
    Copy the full SHA
    8b57351 View commit details
    Browse the repository at this point in the history
Loading