Skip to content

Commit

Permalink
Special cache-cleanup message for read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Jul 18, 2024
1 parent e1190cd commit 551afbf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sources/src/caching/cache-reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export const DEFAULT_WRITEONLY_REASON = `[Cache was set to write-only](https://g

export const EXISTING_GRADLE_HOME = `[Cache was disabled to avoid overwriting a pre-existing Gradle User Home](https://github.com/gradle/actions/blob/v3/docs/setup-gradle.md#overwriting-an-existing-gradle-user-home). Gradle User Home was not restored from or saved to the cache.`

export const CLEANUP_DISABLED_READONLY = `[Cache cleanup](https://github.com/gradle/actions/blob/v3/docs/setup-gradle.md#enabling-cache-cleanup) is always disabled when cache is read-only.`

export const DEFAULT_CLEANUP_DISABLED_REASON = `[Cache cleanup](https://github.com/gradle/actions/blob/v3/docs/setup-gradle.md#enabling-cache-cleanup) was not enabled. It must be explicitly enabled.`

export const DEFAULT_CLEANUP_ENABLED_REASON = `[Cache cleanup](https://github.com/gradle/actions/blob/v3/docs/setup-gradle.md#enabling-cache-cleanup) was enabled.`
Expand Down Expand Up @@ -43,6 +45,7 @@ export class CacheListener {
setReadOnly(reason: string = DEFAULT_READONLY_REASON): void {
this.cacheReadOnly = true
this.cacheStatusReason = reason
this.cacheCleanupMessage = CLEANUP_DISABLED_READONLY
}

setDisabled(reason: string = DEFAULT_DISABLED_REASON): void {
Expand Down

0 comments on commit 551afbf

Please sign in to comment.