Log key and ref for which we're retrieving caches

This commit is contained in:
Henry Mercer 2024-05-21 21:24:12 +01:00
parent 0b4214972e
commit 1bea17f717
6 changed files with 14 additions and 7 deletions

View file

@ -4,6 +4,7 @@ import * as retry from "@octokit/plugin-retry";
import consoleLogLevel from "console-log-level";
import { getActionVersion, getRequiredInput } from "./actions-util";
import { Logger } from "./logging";
import { parseRepositoryNwo } from "./repository";
import {
ConfigurationError,
@ -204,11 +205,14 @@ export interface ActionsCacheItem {
export async function listActionsCaches(
key: string,
ref: string,
logger: Logger,
): Promise<ActionsCacheItem[]> {
const repositoryNwo = parseRepositoryNwo(
getRequiredEnvParam("GITHUB_REPOSITORY"),
);
logger.debug(`Retrieving Actions caches for key ${key} and ref ${ref}`);
const apiClient = getApiClient();
return await apiClient.paginate(
"GET /repos/{owner}/{repo}/actions/caches",