Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to not leverage tar ? #163

Open
dynek opened this issue Jan 9, 2024 · 1 comment
Open

Option to not leverage tar ? #163

dynek opened this issue Jan 9, 2024 · 1 comment

Comments

@dynek
Copy link

dynek commented Jan 9, 2024

Hello,

I am looking for an action that allows me to copy a file to a network device with SCP but that device doesn't have tar, it only accept plain SCP/SFTP.

Is there a way to do this with this action ? I wasn't able to find a configuration option allowing to copy files directly to the device without compression, thank you!

@luojiyin1987
Copy link

use scp of github action ?

name: Deploy via SCP

on: [push]

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    - name: Install SSH Pass
      run: sudo apt-get install sshpass -y

    - name: Copy files via SCP
      env:
        REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
        REMOTE_USER: ${{ secrets.REMOTE_USER }}
        REMOTE_PASSWORD: ${{ secrets.REMOTE_PASSWORD }}
        REMOTE_PATH: ${{ secrets.REMOTE_PATH }}
      run: |
        sshpass -p $REMOTE_PASSWORD scp -o StrictHostKeyChecking=no -r ./path/to/local/files $REMOTE_USER@$REMOTE_HOST:$REMOTE_PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants