mirror of
https://github.com/cross-the-world/scp-pipeline.git
synced 2025-09-10 11:39:52 +08:00
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: scp pipeline
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
TARGET_DIR: /home/github/test
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: scp pipeline
|
|
uses: cross-the-world/scp-pipeline@master
|
|
with:
|
|
host: ${{ secrets.DC_HOST }}
|
|
user: ${{ secrets.DC_USER }}
|
|
pass: ${{ secrets.DC_PASS }}
|
|
port: ${{ secrets.DC_PORT }}
|
|
connect_timeout: 10s
|
|
local: './test/*'
|
|
remote: /home/github/test/
|
|
scp: |
|
|
'./test/test*.csv' => "$TARGET_DIR/test2/"
|
|
'.' => $TARGET_DIR
|
|
|
|
- name: local remote scp 1
|
|
uses: cross-the-world/scp-pipeline@master
|
|
with:
|
|
host: ${{ secrets.DC_HOST }}
|
|
user: ${{ secrets.DC_USER }}
|
|
pass: ${{ secrets.DC_PASS }}
|
|
local: "./test/test1*"
|
|
remote: /home/github/test/test1/
|
|
|
|
- name: local remote scp 2
|
|
uses: cross-the-world/scp-pipeline@master
|
|
env:
|
|
TO_DIR: /home/github/test/test3/
|
|
with:
|
|
host: ${{ secrets.DC_HOST }}
|
|
user: ${{ secrets.DC_USER }}
|
|
pass: ${{ secrets.DC_PASS }}
|
|
local: "."
|
|
remote: $TO_DIR
|