mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-20 09:24:39 +00:00
Implement cache skipping
This commit is contained in:
parent
bb5270559b
commit
2d2273ad58
1 changed files with 6 additions and 0 deletions
|
|
@ -72,6 +72,9 @@ async function buildCacheKeys(): Promise<string[]> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function restoreCache(): Promise<void> {
|
export async function restoreCache(): Promise<void> {
|
||||||
|
if (core.getInput(`skip-cache`, { required: true }).trim() == "true")
|
||||||
|
return
|
||||||
|
|
||||||
if (!utils.isValidEvent()) {
|
if (!utils.isValidEvent()) {
|
||||||
utils.logWarning(
|
utils.logWarning(
|
||||||
`Event Validation Error: The event type ${process.env[Events.Key]} is not supported because it's not tied to a branch or tag ref.`
|
`Event Validation Error: The event type ${process.env[Events.Key]} is not supported because it's not tied to a branch or tag ref.`
|
||||||
|
|
@ -112,6 +115,9 @@ export async function restoreCache(): Promise<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function saveCache(): Promise<void> {
|
export async function saveCache(): Promise<void> {
|
||||||
|
if (core.getInput(`skip-cache`, { required: true }).trim() == "true")
|
||||||
|
return
|
||||||
|
|
||||||
// Validate inputs, this can cause task failure
|
// Validate inputs, this can cause task failure
|
||||||
if (!utils.isValidEvent()) {
|
if (!utils.isValidEvent()) {
|
||||||
utils.logWarning(
|
utils.logWarning(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue