remove output setting (#22)

Relates: #21
This commit is contained in:
Denis Isaev
2020-05-23 12:34:30 +03:00
committed by GitHub
parent 3395f777a4
commit 8870cfbcd4
5 changed files with 3 additions and 53 deletions

View File

@ -1,6 +1,6 @@
import * as core from "@actions/core"
import { Outputs, RefKey, State } from "../constants"
import { RefKey, State } from "../constants"
export function isExactKeyMatch(key: string, cacheKey?: string): boolean {
return !!(
@ -15,16 +15,6 @@ export function setCacheState(state: string): void {
core.saveState(State.CacheMatchedKey, state)
}
export function setCacheHitOutput(isCacheHit: boolean): void {
core.setOutput(Outputs.CacheHit, isCacheHit.toString())
}
export function setOutputAndState(key: string, cacheKey?: string): void {
setCacheHitOutput(isExactKeyMatch(key, cacheKey))
// Store the matched cache key if it exists
cacheKey && setCacheState(cacheKey)
}
export function getCacheState(): string | undefined {
const cacheKey = core.getState(State.CacheMatchedKey)
if (cacheKey) {