This commit is contained in:
Trym Lund Flogard 2021-06-02 18:56:10 +02:00
parent 71d45ee738
commit ac058f2460
2 changed files with 718 additions and 716 deletions

1429
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -150,11 +150,12 @@ export class NextcloudClient {
private async upload(file: string) {
const remoteFileDir = `/artifacts/${this.guid}`;
core.info("Creating directory...");
core.info("Checking directory...");
if (!(await this.davClient.exists(remoteFileDir))) {
core.info("Creating directory...");
await this.davClient.createDirectory(remoteFileDir, { recursive: true });
}
const remoteFilePath = path.join(remoteFileDir, `${this.artifact}.zip`);
core.info("Transferring file...");
fsSync.createReadStream(file)