chore: copy file via ssh password
parent
a6224ab4f0
commit
b154adaf5c
@ -1,65 +1,18 @@
|
|||||||
workflow "Copy File Via SSH" {
|
name: scp files
|
||||||
on = "push"
|
on: [push]
|
||||||
resolves = [
|
jobs:
|
||||||
"Copy file via ssh password",
|
|
||||||
"Copy file via ssh key",
|
|
||||||
"Add source in args",
|
|
||||||
"Add secret in args",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Copy file via ssh password" {
|
build:
|
||||||
uses = "appleboy/scp-action@master"
|
name: Build
|
||||||
env = {
|
runs-on: ubuntu-latest
|
||||||
SOURCE = "tests/a.txt,tests/b.txt"
|
steps:
|
||||||
TARGET = "/home/actions/test"
|
|
||||||
}
|
|
||||||
secrets = [
|
|
||||||
"HOST",
|
|
||||||
"USERNAME",
|
|
||||||
"PASSWORD",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Copy file via ssh key" {
|
- name: copy file via ssh password
|
||||||
uses = "appleboy/scp-action@master"
|
uses: appleboy/scp-action@master
|
||||||
env = {
|
env:
|
||||||
SOURCE = "tests/a.txt,tests/b.txt"
|
HOST: ${{ secrets.HOST }}
|
||||||
TARGET = "/home/actions/test"
|
USERNAME: ${{ secrets.USERNAME }}
|
||||||
}
|
PASSWORD: ${{ secrets.PASSWORD }}
|
||||||
secrets = [
|
with:
|
||||||
"HOST",
|
source: "tests/a.txt,tests/b.txt"
|
||||||
"USERNAME",
|
target: "/home/actions/test"
|
||||||
"KEY",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Add source in args" {
|
|
||||||
uses = "appleboy/scp-action@master"
|
|
||||||
env = {
|
|
||||||
TARGET = "/home/actions/test1234"
|
|
||||||
}
|
|
||||||
secrets = [
|
|
||||||
"HOST",
|
|
||||||
"USERNAME",
|
|
||||||
"KEY",
|
|
||||||
]
|
|
||||||
args = ["--source", "tests/a.txt", "--source", "tests/b.txt"]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Add secret in args" {
|
|
||||||
uses = "appleboy/scp-action@master"
|
|
||||||
env = {
|
|
||||||
TARGET = "/home/actions/test1234"
|
|
||||||
}
|
|
||||||
secrets = [
|
|
||||||
"HOST",
|
|
||||||
"TEST_USERNAME",
|
|
||||||
"KEY",
|
|
||||||
]
|
|
||||||
args = [
|
|
||||||
"--username", "$TEST_USERNAME",
|
|
||||||
"--source", "tests/a.txt",
|
|
||||||
"--source", "tests/b.txt",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue