From 215a0580d7ef31afd569905073b36826f51cc950 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 29 Sep 2019 10:43:33 +0800 Subject: [PATCH] chore: initial github actions --- .github/main.workflow | 45 ---------------------------------------- .github/workflows/ci.yml | 17 +++++++++++++++ 2 files changed, 17 insertions(+), 45 deletions(-) delete mode 100644 .github/main.workflow create mode 100644 .github/workflows/ci.yml diff --git a/.github/main.workflow b/.github/main.workflow deleted file mode 100644 index f7a09d8..0000000 --- a/.github/main.workflow +++ /dev/null @@ -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'", - ] -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..62e44fa --- /dev/null +++ b/.github/workflows/ci.yml @@ -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