mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
Feature/no known hosts (#181)
* add "if_key_exists" * add test * fix flag * fix SSH connection commands * add test for if_key_exists=ignore * add test for if_key_exists=fail * add tests to Windows / macOS * update CHANGELOG * update badges * update README * fix README * update README * test no_known_hosts parameter * implement * ignore known_hosts if no_known_hosts is true * refactor * no_known_hosts is false * Revert "no_known_hosts is false" This reverts commit206d310c5c
. * test on Windows / macOS * test on Docker containers * add tests for Docker containers * test no_known_hosts parameter * implement * ignore known_hosts if no_known_hosts is true * refactor * no_known_hosts is false * Revert "no_known_hosts is false" This reverts commit206d310c5c
. * test on Windows / macOS * test on Docker containers * use `known_hosts: no` instead of `no_known_hosts: true` * update README * update README * "known_hosts: no" -> "known_hosts: unnecessary" * update README * update README * update CHANGELOG
This commit is contained in:
parent
f8aa6610de
commit
954c620b17
10 changed files with 208 additions and 37 deletions
29
.github/workflows/verify-on-container-alpine.yml
vendored
29
.github/workflows/verify-on-container-alpine.yml
vendored
|
@ -301,3 +301,32 @@ jobs:
|
|||
run: ls -l /root/.ssh
|
||||
- name: git clone through SSH
|
||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||
|
||||
known_hosts-unnecessary:
|
||||
name: without known_hosts file
|
||||
runs-on: ${{ matrix.os }}
|
||||
container: ${{ matrix.container }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- ubuntu-20.04
|
||||
container:
|
||||
- alpine:3.10
|
||||
- alpine:3.11
|
||||
- alpine:3.12
|
||||
- alpine:3.13
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: apk add openssh-client git
|
||||
- name: Checkout source codes
|
||||
uses: actions/checkout@v2
|
||||
- name: Install SSH key
|
||||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: unnecessary
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
|
|
28
.github/workflows/verify-on-container-centos.yml
vendored
28
.github/workflows/verify-on-container-centos.yml
vendored
|
@ -292,3 +292,31 @@ jobs:
|
|||
run: ls -l /root/.ssh
|
||||
- name: git clone through SSH
|
||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||
|
||||
known_hosts-unnecessary:
|
||||
name: without known_hosts file
|
||||
runs-on: ${{ matrix.os }}
|
||||
container: ${{ matrix.container }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- ubuntu-20.04
|
||||
container:
|
||||
- centos:7
|
||||
- centos:8
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: |
|
||||
yum install -y git openssh-clients
|
||||
- name: Checkout source codes
|
||||
uses: actions/checkout@v2
|
||||
- name: Install SSH key
|
||||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: unnecessary
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
|
|
30
.github/workflows/verify-on-container-ubuntu.yml
vendored
30
.github/workflows/verify-on-container-ubuntu.yml
vendored
|
@ -310,3 +310,33 @@ jobs:
|
|||
run: ls -l /root/.ssh
|
||||
- name: git clone through SSH
|
||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||
|
||||
known_hosts-unnecessary:
|
||||
name: without known_hosts file
|
||||
runs-on: ${{ matrix.os }}
|
||||
container: ${{ matrix.container }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- ubuntu-20.04
|
||||
container:
|
||||
- ubuntu:16.04
|
||||
- ubuntu:18.04
|
||||
- ubuntu:20.04
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: |
|
||||
apt update
|
||||
apt -y install openssh-client git
|
||||
- name: Checkout source codes
|
||||
uses: actions/checkout@v2
|
||||
- name: Install SSH key
|
||||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: unnecessary
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
|
|
21
.github/workflows/verify-on-macos.yml
vendored
21
.github/workflows/verify-on-macos.yml
vendored
|
@ -237,3 +237,24 @@ jobs:
|
|||
run: ls -l ~/.ssh
|
||||
- name: git clone through SSH
|
||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||
|
||||
known_hosts-unnecessary:
|
||||
name: without known_hosts file
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout source codes
|
||||
uses: actions/checkout@v2
|
||||
- name: Install SSH key
|
||||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: unnecessary
|
||||
- name: print created files
|
||||
run: ls -l ~/.ssh
|
||||
|
|
21
.github/workflows/verify-on-ubuntu.yml
vendored
21
.github/workflows/verify-on-ubuntu.yml
vendored
|
@ -257,3 +257,24 @@ jobs:
|
|||
run: ls -l ~/.ssh
|
||||
- name: git clone through SSH
|
||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||
|
||||
known_hosts-unnecessary:
|
||||
name: without known_hosts file
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout source codes
|
||||
uses: actions/checkout@v2
|
||||
- name: Install SSH key
|
||||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: unnecessary
|
||||
- name: print created files
|
||||
run: ls -l ~/.ssh
|
||||
|
|
21
.github/workflows/verify-on-windows.yml
vendored
21
.github/workflows/verify-on-windows.yml
vendored
|
@ -237,3 +237,24 @@ jobs:
|
|||
run: ls -l ~/.ssh
|
||||
- name: git clone through SSH
|
||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||
|
||||
known_hosts-unnecessary:
|
||||
name: without known_hosts file
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-16.04
|
||||
- ubuntu-18.04
|
||||
- ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout source codes
|
||||
uses: actions/checkout@v2
|
||||
- name: Install SSH key
|
||||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: unnecessary
|
||||
- name: print created files
|
||||
run: ls -l ~/.ssh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue