forked from garygrossgarten/github-action-ssh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e6ff35
commit d7e0a42
Showing
3 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,49 @@ | ||
# Github Action SSH | ||
# GitHub Action SSH | ||
|
||
This Project is being developed as a Javascript Github Action. | ||
Simple GitHub Action to run a command on a remote server using SSH. This is working with the latest [GitHub Actions](https://github.com/features/actions). | ||
|
||
Using [ssh2](https://github.com/mscdex/ssh2) via [node-ssh](https://github.com/steelbrain/node-ssh). 🚀 | ||
## ✨ Example Usage | ||
|
||
**Example using OpenSSH encrypted private key** | ||
|
||
```yml | ||
- name: ls -a via ssh | ||
uses: garygrossgarten/github-action-ssh@release | ||
with: | ||
command: ls -a | ||
host: ${{ secrets.HOST }} | ||
username: garygrossgarten | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
privateKey: ${{ secrets.PRIVATE_KEY}} | ||
``` | ||
🔐 Set your secrets here: `https://github.com/USERNAME/REPO/settings/secrets`. | ||
|
||
Check out [the workflow example](.github/workflows/ssh-example-workflow.yml) for a minimalistic yaml workflow in GitHub Actions. | ||
|
||
**Result** | ||
|
||
![result of example ssh workflow](result.png) | ||
|
||
## Options | ||
|
||
- **host** - _string_ - Hostname or IP address of the server. **Default:** `'localhost'` | ||
|
||
- **port** - _integer_ - Port number of the server. **Default:** `22` | ||
|
||
- **username** - _string_ - Username for authentication. **Default:** (none) | ||
|
||
- **password** - _string_ - Password for password-based user authentication. **Default:** (none) | ||
|
||
- **privateKey** - _mixed_ - _Buffer_ or _string_ that contains a private key for either key-based or hostbased user authentication (OpenSSH format). **Default:** (none) | ||
|
||
- **passphrase** - _string_ - For an encrypted private key, this is the passphrase used to decrypt it. **Default:** (none) | ||
|
||
- **tryKeyboard** - _boolean_ - Try keyboard-interactive user authentication if primary user authentication method fails. **Default:** `false` | ||
|
||
## Development | ||
|
||
--- | ||
|
||
This thing is build using Typescript and | ||
[ssh2](https://github.com/mscdex/ssh2) (via [node-ssh](https://github.com/steelbrain/node-ssh)). 🚀 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.