Update ci.yml
This commit is contained in:
parent
61e292b601
commit
f87c226dbb
116
.github/workflows/ci.yml
vendored
116
.github/workflows/ci.yml
vendored
@ -8,16 +8,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: executing remote ssh commands using password
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
password: ${{ secrets.PASSWORD }}
|
|
||||||
port: ${{ secrets.PORT }}
|
|
||||||
script: whoami
|
|
||||||
|
|
||||||
- name: executing remote ssh commands using ssh key
|
- name: executing remote ssh commands using ssh key
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@ -26,109 +16,3 @@ jobs:
|
|||||||
key: ${{ secrets.KEY }}
|
key: ${{ secrets.KEY }}
|
||||||
port: ${{ secrets.PORT }}
|
port: ${{ secrets.PORT }}
|
||||||
script: whoami
|
script: whoami
|
||||||
|
|
||||||
- name: multiple command
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
key: ${{ secrets.KEY }}
|
|
||||||
port: ${{ secrets.PORT }}
|
|
||||||
script: |
|
|
||||||
whoami
|
|
||||||
ls -al
|
|
||||||
|
|
||||||
# - name: stop script if command error
|
|
||||||
# uses: ./
|
|
||||||
# with:
|
|
||||||
# host: ${{ secrets.HOST }}
|
|
||||||
# username: ${{ secrets.USERNAME }}
|
|
||||||
# key: ${{ secrets.KEY }}
|
|
||||||
# port: ${{ secrets.PORT }}
|
|
||||||
# script_stop: true
|
|
||||||
# script: |
|
|
||||||
# mkdir abc/def
|
|
||||||
# ls -al
|
|
||||||
|
|
||||||
- name: pass environment
|
|
||||||
uses: ./
|
|
||||||
env:
|
|
||||||
FOO: "BAR"
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
key: ${{ secrets.KEY }}
|
|
||||||
port: ${{ secrets.PORT }}
|
|
||||||
envs: FOO
|
|
||||||
script: |
|
|
||||||
echo "I am $FOO, thanks"
|
|
||||||
echo "I am $BAR, thanks"
|
|
||||||
|
|
||||||
- name: pass multiple environment
|
|
||||||
uses: ./
|
|
||||||
env:
|
|
||||||
FOO: "BAR"
|
|
||||||
BAR: "FOO"
|
|
||||||
SHA: ${{ github.sha }}
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
key: ${{ secrets.KEY }}
|
|
||||||
port: ${{ secrets.PORT }}
|
|
||||||
envs: FOO,BAR,SHA
|
|
||||||
script: |
|
|
||||||
echo "I am $FOO, thanks"
|
|
||||||
echo "I am $BAR, thanks"
|
|
||||||
echo "sha: $SHA"
|
|
||||||
|
|
||||||
- name: ssh key passphrase
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
key: ${{ secrets.SSH2 }}
|
|
||||||
port: ${{ secrets.PORT }}
|
|
||||||
passphrase: ${{ secrets.PASSPHRASE }}
|
|
||||||
script: |
|
|
||||||
whoami
|
|
||||||
ls -al
|
|
||||||
|
|
||||||
- name: use insecure cipher
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
password: ${{ secrets.PASSWORD }}
|
|
||||||
port: ${{ secrets.PORT }}
|
|
||||||
script: |
|
|
||||||
ls \
|
|
||||||
-lah
|
|
||||||
use_insecure_cipher: true
|
|
||||||
|
|
||||||
# https://github.com/appleboy/ssh-action/issues/75#issuecomment-668314271
|
|
||||||
- name: Multiline SSH commands interpreted as single lines
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.HOST }}
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
password: ${{ secrets.PASSWORD }}
|
|
||||||
port: ${{ secrets.PORT }}
|
|
||||||
script_stop: true
|
|
||||||
script: |
|
|
||||||
ls \
|
|
||||||
-lah
|
|
||||||
use_insecure_cipher: true
|
|
||||||
|
|
||||||
# https://github.com/appleboy/ssh-action/issues/85
|
|
||||||
- name: Deployment to multiple hosts with different ports
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
host: "${{ secrets.HOST }}:${{ secrets.PORT }}"
|
|
||||||
username: ${{ secrets.USERNAME }}
|
|
||||||
password: ${{ secrets.PASSWORD }}
|
|
||||||
port: 1024
|
|
||||||
script_stop: true
|
|
||||||
script: |
|
|
||||||
ls \
|
|
||||||
-lah
|
|
||||||
use_insecure_cipher: true
|
|
||||||
|
Loading…
Reference in New Issue
Block a user