generated from actions/javascript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
0 parents
commit 067a55f
Showing
294 changed files
with
45,311 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Wouter Peschier | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Setup SSH Github Action | ||
|
||
This action adds a SSH key and adds a given hostname or IP address to the known hosts file for external server access. It was heavily inspired by [atymic/deployer-php-action](https://github.com/atymic/deployer-php-action). | ||
|
||
You can run this action before copying files to an external server using `scp` or `rsync` for example. | ||
|
||
## Sponsor me | ||
|
||
Did this action spark joy, or you find it useful? Please consider sponsoring me via [GitHub Sponsors](https://github.com/sponsors/kielabokkie). Thanks! | ||
|
||
## Inputs | ||
|
||
| Input | Required | Description | ||
| ------------- | ------------- | ------------- | | ||
| `ssh-private-key` | **Yes** | Private key required to access the host. | | ||
| `ssh-host` | **Yes** | Hostname or IP address of the server you want to access. | | ||
| `ssh-port` | Optional | Port for used for SSH on the host server (port 22 by default). | | ||
| `ssh-socket` | Optional | The unix file socket that the agent uses for communication with other processes. | | ||
|
||
## Example usage | ||
|
||
Just the required inputs: | ||
``` | ||
uses: kielabokkie/ssh-key-and-known-hosts-action@v1 | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
ssh-host: your-server.com | ||
``` | ||
|
||
If your SSH port is different from the default you can change it: | ||
``` | ||
uses: kielabokkie/ssh-key-and-known-hosts-action@v1 | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
ssh-host: your-server.com | ||
ssh-port: 2222 | ||
``` | ||
|
||
If you are using this action on concurrent builds the `ssh-socket` should be unique to prevent `address in use` issues: | ||
``` | ||
uses: kielabokkie/ssh-key-and-known-hosts-action@v1 | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
ssh-host: your-server.com | ||
ssh-socket: /tmp/ssh_agent_${{ github.sha }}.sock | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 'Setup SSH' | ||
description: 'Setup private key and add host to known hosts' | ||
author: 'Wouter Peschier' | ||
inputs: | ||
ssh-private-key: | ||
description: 'Private key required to access the host' | ||
required: true | ||
ssh-host: | ||
description: 'Hostname or IP to add to the known hosts file' | ||
required: true | ||
ssh-port: | ||
description: 'Port for key-scanning the server' | ||
required: false | ||
default: '22' | ||
ssh-socket: | ||
description: 'The unix file socket that the agent uses for communication with other processes' | ||
required: false | ||
default: '/tmp/ssh-auth.sock' | ||
runs: | ||
using: 'node16' | ||
main: 'dist/main/index.js' | ||
post: 'dist/cleanup/index.js' | ||
branding: | ||
icon: 'terminal' | ||
color: 'orange' |
Oops, something went wrong.