forked from cross-the-world/ssh-scp-ssh-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (64 loc) · 1.89 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: scp files
on:
push:
branches:
- latest
env:
TARGET_DIR: /home/github/test
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: ssh scp ssh pipelines
uses: cross-the-world/ssh-scp-ssh-pipelines@latest
env:
WELCOME: "ssh scp ssh pipelines"
LASTSSH: "Doing something after copying"
with:
host: ${{ secrets.DC_HOST }}
user: ${{ secrets.DC_USER }}
pass: ${{ secrets.DC_PASS }}
port: ${{ secrets.DC_PORT }}
connect_timeout: 10s
first_ssh: |-
rm -rf /home/github/test
ls -la
echo $WELCOME
mkdir -p /home/github/test/test1 &&
mkdir -p /home/github/test/test2 &&
scp: |-
'./test/*' => /home/github/test/
./test/test1* => $TARGET_DIR/test1/
./test/test*.csv => "/home/github/test/test2/"
last_ssh: |-
echo $LASTSSH &&
(mkdir test1/test || true)
ls -la
- name: scp ssh pipelines
uses: cross-the-world/ssh-scp-ssh-pipelines@latest
env:
LASTSSH: "Doing something after copying"
with:
host: ${{ secrets.DC_HOST }}
user: ${{ secrets.DC_USER }}
pass: ${{ secrets.DC_PASS }}
scp: |-
./test/test1* => /home/github/test/test1/
"." => "$TARGET_DIR/test3/"
last_ssh: |-
echo $LASTSSH
ls -la
- name: scp pipelines
uses: cross-the-world/ssh-scp-ssh-pipelines@latest
env:
WELCOME: "scp pipelines"
TO_DIR: /home/github/test/test4
with:
host: ${{ secrets.DC_HOST }}
user: ${{ secrets.DC_USER }}
pass: ${{ secrets.DC_PASS }}
scp: |-
'.' => $TO_DIR