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 da92196 commit ea7e694
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
14 changes: 8 additions & 6 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.

14 changes: 8 additions & 6 deletions main/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const SSH2SftpClient = require('ssh2-sftp-client')
const core = require('@actions/core')
const { execSync } = require('child_process')
const path = require('path')

async function run() {
console.log('-----enter----')
execSync('pwd')
execSync('ls -al')
execSync('pwd', { stdio: 'inherit' })
execSync('ls -al', { stdio: 'inherit' })
const sftp = new SSH2SftpClient()
const host = core.getInput('host', { required: true })
const port = core.getInput('port') || 22
Expand All @@ -23,13 +24,14 @@ async function run() {
const retry_factor = core.getInput('retry_factor')
const retry_minTimeout = core.getInput('retry_minTimeout')
const promiseLimit = core.getInput('promiseLimit')
const localDir = core.getInput('local_dir', { required: true })
const localDir1 = core.getInput('local_dir', { required: true })
const localDir = path(__dirname, localDir1)
const remoteBaseDir = core.getInput('remote_base_dir', { required: true })
const remoteBakPath = core.getInput('remote_bak_path')
try {
console.log('Start connect: ')
execSync('pwd')
execSync('ls -al')
console.log('Start connect: ', localDir1, localDir)
execSync('pwd', { stdio: 'inherit' })
execSync('ls -al', { stdio: 'inherit' })
await sftp.connect({
host,
port,
Expand Down

0 comments on commit ea7e694

Please sign in to comment.