1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00

* update README

This commit is contained in:
shimataro 2020-01-17 22:10:04 +09:00
parent 1495b94fd7
commit eb531fef58
No known key found for this signature in database
GPG key ID: BE92C05736911A9D

View file

@ -25,7 +25,6 @@ steps:
uses: shimataro/ssh-key-action@v1 uses: shimataro/ssh-key-action@v1
with: with:
private-key: ${{ secrets.SSH_KEY }} private-key: ${{ secrets.SSH_KEY }}
public-key: ${{ secrets.SSH_KEY_PUBLIC }}
name: id_rsa # optional name: id_rsa # optional
known-hosts: ${{ secrets.KNOWN_HOSTS }} # known_hosts; optional known-hosts: ${{ secrets.KNOWN_HOSTS }} # known_hosts; optional
config: ${{ secrets.CONFIG }} # ssh_config; optional config: ${{ secrets.CONFIG }} # ssh_config; optional
@ -42,7 +41,7 @@ See [Workflow syntax for GitHub Actions](https://help.github.com/en/articles/wor
If you want to install multiple keys, call this action multiple times. If you want to install multiple keys, call this action multiple times.
It is useful for port forwarding. It is useful for port forwarding.
**NOTE:** When this action is called multiple times, **the contents of `known-hosts` and `config` will be appended**. But `public-key` and `private-key` must be saved as different name, by using `name` option. **NOTE:** When this action is called multiple times, **the contents of `known-hosts` and `config` will be appended**. But `private-key` must be saved as different name, by using `name` option.
```yaml ```yaml
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -51,7 +50,6 @@ steps:
uses: shimataro/ssh-key-action@v1 uses: shimataro/ssh-key-action@v1
with: with:
private-key: ${{ secrets.SSH_KEY_OF_BASTION }} private-key: ${{ secrets.SSH_KEY_OF_BASTION }}
public-key: ${{ secrets.SSH_KEY_OF_BASTION_PUBLIC }}
name: id_rsa-bastion name: id_rsa-bastion
known-hosts: ${{ secrets.KNOWN_HOSTS_OF_BASTION }} known-hosts: ${{ secrets.KNOWN_HOSTS_OF_BASTION }}
config: | config: |
@ -63,7 +61,6 @@ steps:
uses: shimataro/ssh-key-action@v1 uses: shimataro/ssh-key-action@v1
with: with:
private-key: ${{ secrets.SSH_KEY_OF_TARGET }} private-key: ${{ secrets.SSH_KEY_OF_TARGET }}
public-key: ${{ secrets.SSH_KEY_OF_TARGET_PUBLIC }}
name: id_rsa-target name: id_rsa-target
known-hosts: ${{ secrets.KNOWN_HOSTS_OF_TARGET }} # will be appended! known-hosts: ${{ secrets.KNOWN_HOSTS_OF_TARGET }} # will be appended!
config: | # will be appended! config: | # will be appended!