mirror of
https://github.com/gradle/actions.git
synced 2025-08-18 06:31:28 +08:00
Add debug logs
This commit is contained in:
parent
aac6626d42
commit
e48ea170d2
@ -1,3 +1,5 @@
|
||||
import * as core from '@actions/core'
|
||||
|
||||
import * as find from './find'
|
||||
import * as checksums from './checksums'
|
||||
import * as hash from './hash'
|
||||
@ -21,6 +23,16 @@ export async function findInvalidWrapperJars(
|
||||
previouslyValidatedChecksums.includes(sha) ||
|
||||
knownValidChecksums.checksums.has(sha)
|
||||
) {
|
||||
if (allowedChecksums.includes(sha)) {
|
||||
core.info("Found allowed Gradle Wrapper JAR file: " + sha)
|
||||
}
|
||||
if (previouslyValidatedChecksums.includes(sha)) {
|
||||
core.info(`Found previously validated Gradle Wrapper JAR file: ${sha}`)
|
||||
}
|
||||
if(knownValidChecksums.checksums.has(sha)) {
|
||||
core.info(`Found known valid Gradle Wrapper JAR file: ${sha}`)
|
||||
}
|
||||
|
||||
result.valid.push(new WrapperJar(wrapperJar, sha))
|
||||
} else {
|
||||
notYetValidatedWrappers.push(new WrapperJar(wrapperJar, sha))
|
||||
@ -36,6 +48,7 @@ export async function findInvalidWrapperJars(
|
||||
if (!fetchedValidChecksums.checksums.has(wrapperJar.checksum)) {
|
||||
result.invalid.push(wrapperJar)
|
||||
} else {
|
||||
core.info(`Fall back - Found valid Gradle Wrapper JAR file: ${wrapperJar.checksum}`)
|
||||
result.valid.push(wrapperJar)
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,9 @@ export async function validateWrappers(
|
||||
|
||||
const allowedChecksums = process.env['ALLOWED_GRADLE_WRAPPER_CHECKSUMS']?.split(',') || []
|
||||
const previouslyValidatedChecksums = checksumCache.load()
|
||||
|
||||
core.info(`gradleUserHome = ${gradleUserHome}`)
|
||||
core.info(`Previously validated checksums loaded from cache: ${previouslyValidatedChecksums.join(', ')}`)
|
||||
|
||||
const result = await findInvalidWrapperJars(
|
||||
workspaceRoot,
|
||||
config.allowSnapshotWrappers(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user