项目作者: matheusvanzan

项目描述 :
SSHPASS Github Action
高级语言: Shell
项目地址: git://github.com/matheusvanzan/sshpass-action.git
创建时间: 2020-07-15T12:59:04Z
项目社区:https://github.com/matheusvanzan/sshpass-action

开源协议:MIT License

下载


SSHPASS Github Action

Github Action to send commands via SSHPASS

Usage

Example usage can be found at sshpass-action-example

  1. - name: Run sshpass commands
  2. uses: matheusvanzan/sshpass-action@v2
  3. with:
  4. host: ${{ secrets.SERVER_HOST }}
  5. user: ${{ secrets.SERVER_USER }}
  6. pass: ${{ secrets.SERVER_PASS }}
  7. run: |
  8. # your
  9. # commands
  10. # here

Optional ssh port

  1. - name: Run sshpass commands
  2. uses: matheusvanzan/sshpass-action@v2
  3. with:
  4. host: ${{ secrets.SERVER_HOST }}
  5. port: 22
  6. user: ${{ secrets.SERVER_USER }}
  7. pass: ${{ secrets.SERVER_PASS }}
  8. run: |
  9. # your
  10. # commands
  11. # here

Optional private key. In this case it will ignore the password if provided.

  1. - name: Run sshpass commands
  2. uses: matheusvanzan/sshpass-action@v2
  3. with:
  4. host: ${{ secrets.SERVER_HOST }}
  5. user: ${{ secrets.SERVER_USER }}
  6. key: ${{ secrets.SERVER_KEY }}
  7. run: |
  8. # your
  9. # commands
  10. # here

Changelog

v2

  • ‘username’ and ‘password’ arguments renamed to ‘user’ and ‘pass’
  • accepts optional ‘port’ argument for the ssh port
  • accepts optional ‘key’ argument for the private key

v1

  • initial version