Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alinz/ssh-scp-action
Github actions for executing commands and uploading files to remote server
https://github.com/alinz/ssh-scp-action
actions bash github scp ssh
Last synced: about 2 months ago
JSON representation
Github actions for executing commands and uploading files to remote server
- Host: GitHub
- URL: https://github.com/alinz/ssh-scp-action
- Owner: alinz
- License: mit
- Created: 2019-11-19T05:32:05.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-17T20:58:58.000Z (over 4 years ago)
- Last Synced: 2024-10-28T17:52:27.265Z (3 months ago)
- Topics: actions, bash, github, scp, ssh
- Language: Shell
- Size: 5.86 KB
- Stars: 27
- Watchers: 4
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SSH and SCP Setup in GITHUB's Action
Setup ssh agent for both ssh and scp. Script can be run before and after scp operation has been completed
## USAGE
```yml
- name: Operations
uses: alinz/ssh-scp-action@master
env:
HELLO: cool
MESSAGE: hello world
with:
key: ${{ secrets.SSH_KEY }}
host: example.com
port: 22
user: john
# runs this on remove server
ssh_before: |
rm -rf sample1.dat sample2.dat
echo $HELLO
echo $MESSAGE
ls -lath# then uploads these 2 files
scp: |
sample1.txt [email protected]:~/sample1.dat
sample2.txt [email protected]:~/sample2.dat# then run these commands
ssh_after: |
echo $HELLO
echo $MESSAGE
ls -lath
```