mirror of
https://github.com/appleboy/scp-action.git
synced 2024-11-28 02:27:31 +08:00
chore: copy file via ssh password
This commit is contained in:
parent
a6224ab4f0
commit
b154adaf5c
79
.github/workflows/ci.yml
vendored
79
.github/workflows/ci.yml
vendored
@ -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",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
13
Dockerfile
13
Dockerfile
@ -1,15 +1,4 @@
|
|||||||
FROM appleboy/drone-scp:1.5.1-linux-amd64
|
FROM appleboy/drone-scp
|
||||||
|
|
||||||
# Github labels
|
|
||||||
LABEL "com.github.actions.name"="SCP Files"
|
|
||||||
LABEL "com.github.actions.description"="Copy files and artifacts via SSH"
|
|
||||||
LABEL "com.github.actions.icon"="copy"
|
|
||||||
LABEL "com.github.actions.color"="gray-dark"
|
|
||||||
|
|
||||||
LABEL "repository"="https://github.com/appleboy/scp-action"
|
|
||||||
LABEL "homepage"="https://github.com/appleboy"
|
|
||||||
LABEL "maintainer"="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
|
||||||
LABEL "version"="0.0.1"
|
|
||||||
|
|
||||||
ADD entrypoint.sh /entrypoint.sh
|
ADD entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user