|
|
@ -6,8 +6,11 @@ jobs:
|
|
|
|
name: Build
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: checkout
|
|
|
|
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
|
|
|
|
- name: executing remote ssh commands using password
|
|
|
|
- name: executing remote ssh commands using password
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
@ -16,7 +19,7 @@ jobs:
|
|
|
|
script: whoami
|
|
|
|
script: whoami
|
|
|
|
|
|
|
|
|
|
|
|
- name: executing remote ssh commands using ssh key
|
|
|
|
- name: executing remote ssh commands using ssh key
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
@ -25,7 +28,7 @@ jobs:
|
|
|
|
script: whoami
|
|
|
|
script: whoami
|
|
|
|
|
|
|
|
|
|
|
|
- name: multiple command
|
|
|
|
- name: multiple command
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
@ -36,7 +39,7 @@ jobs:
|
|
|
|
ls -al
|
|
|
|
ls -al
|
|
|
|
|
|
|
|
|
|
|
|
# - name: stop script if command error
|
|
|
|
# - name: stop script if command error
|
|
|
|
# uses: appleboy/ssh-action@master
|
|
|
|
# uses: ./
|
|
|
|
# with:
|
|
|
|
# with:
|
|
|
|
# host: ${{ secrets.HOST }}
|
|
|
|
# host: ${{ secrets.HOST }}
|
|
|
|
# username: ${{ secrets.USERNAME }}
|
|
|
|
# username: ${{ secrets.USERNAME }}
|
|
|
@ -48,7 +51,7 @@ jobs:
|
|
|
|
# ls -al
|
|
|
|
# ls -al
|
|
|
|
|
|
|
|
|
|
|
|
- name: pass environment
|
|
|
|
- name: pass environment
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
uses: ./
|
|
|
|
env:
|
|
|
|
env:
|
|
|
|
FOO: "BAR"
|
|
|
|
FOO: "BAR"
|
|
|
|
with:
|
|
|
|
with:
|
|
|
@ -62,7 +65,7 @@ jobs:
|
|
|
|
echo "I am $BAR, thanks"
|
|
|
|
echo "I am $BAR, thanks"
|
|
|
|
|
|
|
|
|
|
|
|
- name: pass multiple environment
|
|
|
|
- name: pass multiple environment
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
uses: ./
|
|
|
|
env:
|
|
|
|
env:
|
|
|
|
FOO: "BAR"
|
|
|
|
FOO: "BAR"
|
|
|
|
BAR: "FOO"
|
|
|
|
BAR: "FOO"
|
|
|
@ -79,7 +82,7 @@ jobs:
|
|
|
|
echo "sha: $SHA"
|
|
|
|
echo "sha: $SHA"
|
|
|
|
|
|
|
|
|
|
|
|
- name: ssh key passphrase
|
|
|
|
- name: ssh key passphrase
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|