diff --git a/src/constants.ts b/src/constants.ts index acae4c8a..94d7667f 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -17,5 +17,6 @@ export const INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; export const INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; export const INPUT_CACHE = 'cache'; +export const INPUT_JOB_STATUS = 'job-status'; export const STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; diff --git a/src/util.ts b/src/util.ts index 89beca06..588b3624 100644 --- a/src/util.ts +++ b/src/util.ts @@ -5,6 +5,8 @@ import * as semver from 'semver'; import * as core from '@actions/core'; import * as tc from '@actions/tool-cache'; +import { INPUT_JOB_STATUS } from './constants'; + export function getTempDir() { let tempDirectory = process.env['RUNNER_TEMP'] || os.tmpdir(); @@ -71,7 +73,7 @@ export function getToolcachePath(toolName: string, version: string, architecture } export function isJobStatusSuccess() { - const jobStatus = core.getInput('job-status'); + const jobStatus = core.getInput(INPUT_JOB_STATUS); return jobStatus === 'success'; }