mirror of
https://gitea.com/actions/appleboy-ssh-action.git
synced 2024-11-22 18:19:36 +01:00
chore: initial github actions
This commit is contained in:
parent
b305709c8d
commit
215a0580d7
2 changed files with 17 additions and 45 deletions
45
.github/main.workflow
vendored
45
.github/main.workflow
vendored
|
@ -1,45 +0,0 @@
|
||||||
workflow "Remote ssh commands" {
|
|
||||||
on = "push"
|
|
||||||
resolves = [
|
|
||||||
"Executing remote ssh commands",
|
|
||||||
"Support Private Key",
|
|
||||||
"Multiple Commands",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Executing remote ssh commands" {
|
|
||||||
uses = "appleboy/ssh-action@master"
|
|
||||||
secrets = [
|
|
||||||
"HOST",
|
|
||||||
"PASSWORD",
|
|
||||||
]
|
|
||||||
args = [
|
|
||||||
"--user", "actions",
|
|
||||||
"--script", "whoami",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Support Private Key" {
|
|
||||||
uses = "appleboy/ssh-action@master"
|
|
||||||
secrets = [
|
|
||||||
"HOST",
|
|
||||||
"KEY",
|
|
||||||
]
|
|
||||||
args = [
|
|
||||||
"--user", "actions",
|
|
||||||
"--script", "'ls -al'",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
action "Multiple Commands" {
|
|
||||||
uses = "appleboy/ssh-action@master"
|
|
||||||
secrets = [
|
|
||||||
"HOST",
|
|
||||||
"KEY",
|
|
||||||
]
|
|
||||||
args = [
|
|
||||||
"--user", "actions",
|
|
||||||
"--script", "'whoami'",
|
|
||||||
"--script", "'ls -al'",
|
|
||||||
]
|
|
||||||
}
|
|
17
.github/workflows/ci.yml
vendored
Normal file
17
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
name: ssh command
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: executing remote ssh commands
|
||||||
|
uses: appleboy/scp-action@master
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
password: ${{ secrets.PASSWORD }}
|
||||||
|
port: ${{ secrets.PORT }}
|
||||||
|
script: whoami
|
Loading…
Reference in a new issue