Skip to content

Merge pull request #49 from undg/master #44

Merge pull request #49 from undg/master

Merge pull request #49 from undg/master #44

name: scp copy folder to remote via SSH
on:
push
jobs:
build:
runs-on: ubuntu-latest
env:
CI: true
LOCAL: test
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup demo
run: |
mkdir test
touch test/oof.txt
touch test/.dot.txt
- name: Copy folder content recursively to remote
uses: ./
with:
local: test
remote: scp/directory
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.PASSWORD }}
privateKey: ${{ secrets.PRIVATE_KEY}}
- name: Copy folder content recursively to remote (clean directory)
uses: ./
with:
local: test
remote: scp/directory
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.PASSWORD }}
privateKey: ${{ secrets.PRIVATE_KEY}}
rmRemote: true
dotfiles: true
- name: Copy folder content recursively to remote (atomic put)
uses: ./
with:
local: test
remote: scp/atomic
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.PASSWORD }}
privateKey: ${{ secrets.PRIVATE_KEY}}
rmRemote: true
dotfiles: true
atomicPut: true
- name: Copy single file to remote
uses: ./
with:
local: test/oof.txt
remote: scp/single/readme.md
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.PASSWORD }}
privateKey: ${{ secrets.PRIVATE_KEY}}
- name: Copy dotfile to remote
uses: ./
with:
local: test/.dot.txt
remote: scp/single/.dot.txt
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.PASSWORD }}
privateKey: ${{ secrets.PRIVATE_KEY}}
dotfiles: true
- name: Copy with user/pw
uses: ./
with:
local: test/oof.txt
remote: scp/user/pw/oof.txt
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.PASSWORD }}
- name: With ENV
uses: ./
with:
local: ${{ env.LOCAL }}
remote: scp/directory
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.PASSWORD }}
privateKey: ${{ secrets.PRIVATE_KEY}}
rmRemote: true
dotfiles: true