mirror of
https://github.com/trympet/nextcloud-artifacts-action.git
synced 2025-04-28 13:46:09 +02:00
test
This commit is contained in:
parent
c38757acba
commit
2431c40b14
1427
dist/index.js
vendored
1427
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@ -43,6 +43,7 @@ export class NextcloudClient {
|
|||||||
|
|
||||||
core.info("Uploading to Nextcloud...");
|
core.info("Uploading to Nextcloud...");
|
||||||
const path = await this.upload(zip);
|
const path = await this.upload(zip);
|
||||||
|
core.info(`File path: ${path}`);
|
||||||
core.info("Sharing file...");
|
core.info("Sharing file...");
|
||||||
await this.shareFile(path);
|
await this.shareFile(path);
|
||||||
}
|
}
|
||||||
@ -161,7 +162,7 @@ export class NextcloudClient {
|
|||||||
const stream = fsSync.createReadStream(file)
|
const stream = fsSync.createReadStream(file)
|
||||||
.pipe(this.davClient.createWriteStream(remoteFilePath));
|
.pipe(this.davClient.createWriteStream(remoteFilePath));
|
||||||
|
|
||||||
return await new Promise<string>((resolve, reject) =>{
|
return await new Promise<string>((resolve, reject) => {
|
||||||
stream.on('error', () => reject("Failed to upload file"))
|
stream.on('error', () => reject("Failed to upload file"))
|
||||||
.on('finish', () => resolve(remoteFilePath));
|
.on('finish', () => resolve(remoteFilePath));
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user