Moved cache-related code into subpackage

This commit is contained in:
daz
2024-04-08 13:29:58 -06:00
parent ecf84edd45
commit 528fe78d31
14 changed files with 131 additions and 137 deletions

View File

@@ -3,16 +3,14 @@ import * as github from '@actions/github'
import {RequestError} from '@octokit/request-error'
import {BuildResult} from './build-results'
import {CacheListener, generateCachingReport} from './cache-reporting'
import {SummaryConfig, getGithubToken} from './input-params'
export async function generateJobSummary(
buildResults: BuildResult[],
cacheListener: CacheListener,
cachingReport: string,
config: SummaryConfig
): Promise<void> {
const summaryTable = renderSummaryTable(buildResults)
const cachingReport = generateCachingReport(cacheListener)
const hasFailure = buildResults.some(result => result.buildFailed)
if (config.shouldGenerateJobSummary(hasFailure)) {