Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
2ue committed Apr 29, 2024
1 parent 5ad81b9 commit 447490a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,18 @@ async function run() {
// await sftp.rcopy(remoteBaseDir, `${remoteBakPath}/backup`)
// }
console.log('Start upload: ', localDir1, '=>', remoteBaseDir)
await sftp.uploadDir(localDir1, remoteBaseDir, {
const rslt = await sftp.uploadDir(localDir1, remoteBaseDir, {
filter: (localPath, isDir) => {
core.debug('Upload: ', localPath, isDir)
return true
}
})

console.log('upload result:', rslt)
console.log(
`Successfully uploaded directory ${localDir} to ${remoteBaseDir}`
)
} catch (error) {
console.log('upload error:', error)
// @ts-ignore
core.setFailed(`Error uploading directory: ${error.message}`)
throw error
Expand Down

0 comments on commit 447490a

Please sign in to comment.