add nextcloud support

This commit is contained in:
Trym Lund Flogard
2021-06-02 15:19:19 +02:00
parent 933f52b6fa
commit 5705c5cf8a
9 changed files with 857 additions and 4 deletions

35
src/Inputs.ts Normal file
View 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;
}
}