5
0
mirror of https://github.com/astral-sh/setup-uv.git synced 2026-03-29 01:49:53 +00:00

Do not expect GITHUB_TOKEN to be set or valid (#262)

This fixes issues with GHES

Fixes: #221
This commit is contained in:
Kevin Stillhammer
2025-01-30 14:37:07 +01:00
committed by GitHub
parent 2625dd350b
commit 4db96194c3
8 changed files with 8078 additions and 8774 deletions

View File

@@ -1,16 +1,22 @@
import * as github from "@actions/github";
import * as core from "@actions/core";
import { GITHUB_COM_API, OWNER, REPO } from "./utils/constants";
import * as semver from "semver";
import * as core from "@actions/core";
import { Octokit } from "@octokit/core";
import { paginateRest } from "@octokit/plugin-paginate-rest";
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
import { OWNER, REPO } from "./utils/constants";
import { updateChecksums } from "./download/checksum/update-known-checksums";
const PaginatingOctokit = Octokit.plugin(paginateRest, restEndpointMethods);
async function run(): Promise<void> {
const checksumFilePath = process.argv.slice(2)[0];
const github_token = process.argv.slice(2)[1];
const octokit = github.getOctokit(github_token, { baseUrl: GITHUB_COM_API });
const octokit = new PaginatingOctokit({
auth: github_token,
});
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: OWNER,