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
ae39220a7a
commit
c38757acba
1437
dist/index.js
vendored
1437
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@ -158,12 +158,13 @@ export class NextcloudClient {
|
|||||||
|
|
||||||
const remoteFilePath = path.join(remoteFileDir, `${this.artifact}.zip`);
|
const remoteFilePath = path.join(remoteFileDir, `${this.artifact}.zip`);
|
||||||
core.info("Transferring file...");
|
core.info("Transferring file...");
|
||||||
fsSync.createReadStream(file)
|
const stream = fsSync.createReadStream(file)
|
||||||
.pipe(this.davClient.createWriteStream(remoteFilePath))
|
.pipe(this.davClient.createWriteStream(remoteFilePath));
|
||||||
.on('error', () => core.setFailed("Failed to upload file"))
|
|
||||||
.on('finish', () => core.info("File upload finished"));
|
|
||||||
|
|
||||||
return remoteFilePath;
|
return await new Promise<string>((resolve, reject) =>{
|
||||||
|
stream.on('error', () => reject("Failed to upload file"))
|
||||||
|
.on('finish', () => resolve(remoteFilePath));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private async shareFile(remoteFilePath: string) {
|
private async shareFile(remoteFilePath: string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user