Fix things
This commit is contained in:
@@ -9,6 +9,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const fs_1 = require("fs");
|
||||
const path_1 = require("path");
|
||||
class CoreInputs {
|
||||
constructor(context) {
|
||||
this.context = context;
|
||||
@@ -16,6 +17,9 @@ class CoreInputs {
|
||||
get artifact() {
|
||||
return core.getInput('artifact');
|
||||
}
|
||||
get artifactName() {
|
||||
return path_1.basename(this.artifact);
|
||||
}
|
||||
get artifactContentType() {
|
||||
const type = core.getInput('artifactContentType');
|
||||
if (type) {
|
||||
@@ -66,6 +70,9 @@ class CoreInputs {
|
||||
get token() {
|
||||
return core.getInput('token', { required: true });
|
||||
}
|
||||
readArtifact() {
|
||||
return fs_1.readFileSync(this.artifact);
|
||||
}
|
||||
stringFromFile(path) {
|
||||
return fs_1.readFileSync(path, 'utf-8');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user