also looking at this
fix(installer): resolve versions against live sources when one is unreachable
#255
6 files
+400
-44
| @@ -332,6 +332,10 @@ async function installSystemPackages( | ||
| 332 | 332 | const installed = await installResolvedSystemPackages(requests, { |
| 333 | 333 | installDir: pantryDir, |
| 334 | 334 | onRetry: message => core.warning(message), |
| 335 | // `quiet` silences progress, not this: a pin that resolved off a stale | |
| 336 | // bundled catalog because a version source was unreachable installs an | |
| 337 | // older version than upstream has, and CI is where that happens. | |
| 338 | onWarn: message => core.warning(message), | |
| 335 | 339 | nativeInstall: packageSpecs => exec.exec(pantryExecutable, ['install', ...packageSpecs, '--no-save'], { |
| 336 | 340 | cwd: path.dirname(pantryDir), |
| 337 | 341 | env: { ...process.env, CI: 'true', NO_COLOR: '1' } as { [key: string]: string }, |
| @@ -662,6 +666,18 @@ export async function run(): Promise<void> { | ||
| 662 | 666 | } |
| 663 | 667 | else core.warning('GitHub build dependency archive cache unavailable; local caching remains enabled') |
| 664 | 668 | } |
| 669 | ||
| 670 | // Authenticate the SDK's upstream version lookups before anything resolves | |
| 671 | // a version. Unauthenticated api.github.com is 60 req/hr per IP and runner | |
| 672 | // pools share egress addresses, so a 403 here is routine — and a failed | |
| 673 | // lookup is what made a published `bun.sh: ^1.4.1` report as having no | |
| 674 | // satisfying version. `github.token` is the input's default, so this is on | |
| 675 | // by default; passing `github-token: ''` opts out. Kept in-process rather | |
| 676 | // than exported, so it reaches the lookups without widening the job env. | |
| 677 | const githubToken = core.getInput('github-token') | |
| 678 | if (githubToken && !process.env.PANTRY_GITHUB_TOKEN) | |
| 679 | process.env.PANTRY_GITHUB_TOKEN = githubToken | |
| 680 | ||
| 665 | 681 | const inputs: ActionInputs = { |
| 666 | 682 | nativeApp: (core.getInput('native-app') || undefined) as ActionInputs['nativeApp'], |
| 667 | 683 | version: core.getInput('version') || 'latest', |