Drop job-status logic.

It requires a dummy entry in the `action.yml` which was missing. Drop the entire logic because it's not needed at this point.
This commit is contained in:
Fabio Niephaus
2022-08-31 11:24:48 +02:00
parent c641a461ac
commit 3b96e2ea68
7 changed files with 6 additions and 3162 deletions

View File

@@ -26,7 +26,6 @@
import * as core from '@actions/core'
import * as constants from './constants'
import {isJobStatusSuccess} from './utils'
import {save} from './cache'
/**
@@ -34,9 +33,8 @@ import {save} from './cache'
* @returns Promise that will be resolved when the save process finishes
*/
async function saveCache(): Promise<void> {
const jobStatus = isJobStatusSuccess()
const cache = core.getInput(constants.INPUT_CACHE)
return jobStatus && cache ? save(cache) : Promise.resolve()
return cache ? save(cache) : Promise.resolve()
}
/**

View File

@@ -8,7 +8,6 @@ export const INPUT_GITHUB_TOKEN = 'github-token'
export const INPUT_SET_JAVA_HOME = 'set-java-home'
export const INPUT_CACHE = 'cache'
export const INPUT_NI_MUSL = 'native-image-musl'
export const INPUT_JOB_STATUS = 'job-status'
export const IS_LINUX = process.platform === 'linux'
export const IS_MACOS = process.platform === 'darwin'

View File

@@ -112,7 +112,3 @@ function toSemVer(version: string): string {
const patch = parts.length > 2 ? parts.slice(2).join('-') : '0'
return `${major}.${minor}.${patch}`
}
export function isJobStatusSuccess(): boolean {
return core.getInput(c.INPUT_JOB_STATUS) === 'success'
}