mirror of
https://github.com/trympet/nextcloud-artifacts-action.git
synced 2025-07-13 05:35:38 +02:00
add nextcloud support
This commit is contained in:
35
src/Inputs.ts
Normal file
35
src/Inputs.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import core from '@actions/core';
|
||||
import { NoFileOption } from './NoFileOption';
|
||||
|
||||
export class Inputs {
|
||||
static get ArtifactName(): string {
|
||||
return core.getInput("name");
|
||||
}
|
||||
|
||||
static get ArtifactPath(): string {
|
||||
return core.getInput("path");
|
||||
}
|
||||
|
||||
static get Retention(): string {
|
||||
return core.getInput("retention-days");
|
||||
}
|
||||
|
||||
static get Endpoint(): string {
|
||||
return core.getInput("retention-days");
|
||||
}
|
||||
|
||||
static get NoFileBehvaior(): NoFileOption {
|
||||
const notFoundAction = core.getInput("if-no-files-found");
|
||||
const noFileBehavior: NoFileOption = NoFileOption[notFoundAction as keyof typeof NoFileOption];
|
||||
|
||||
if (!noFileBehavior) {
|
||||
core.setFailed(
|
||||
`Unrecognized ${"ifNoFilesFound"} input. Provided: ${notFoundAction}. Available options: ${Object.keys(
|
||||
NoFileOption
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
return noFileBehavior;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user