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 e3c4b8a commit da92196
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 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.

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

async function run() {
console.log('-----enter----')
execSync('pwd')
execSync('ls -al')
const sftp = new SSH2SftpClient()
const host = core.getInput('host', { required: true })
const port = core.getInput('port') || 22
Expand All @@ -23,6 +27,9 @@ async function run() {
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')
await sftp.connect({
host,
port,
Expand Down

0 comments on commit da92196

Please sign in to comment.