style: put the name of input to the constants.ts

This commit is contained in:
Kengo TODA 2021-08-19 10:49:41 +08:00
parent cb966d0c2b
commit 6edf849b58
2 changed files with 4 additions and 1 deletions

View file

@ -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';

View file

@ -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';
}