mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
update rest tests
This commit is contained in:
parent
58e993d2ed
commit
de9dd4fec2
5 changed files with 497 additions and 207 deletions
148
.github/workflows/verify-on-container-alpine.yml
vendored
148
.github/workflows/verify-on-container-alpine.yml
vendored
|
@ -31,11 +31,42 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pem-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PEM format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
container:
|
||||||
|
- alpine:3.10
|
||||||
|
- alpine:3.11
|
||||||
|
- alpine:3.12
|
||||||
|
- alpine:3.13
|
||||||
|
fail-fast: false
|
||||||
|
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: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l /root/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-pkcs8:
|
ssh-pkcs8:
|
||||||
name: Connect to github.com (PKCS8 format)
|
name: Connect to github.com (PKCS8 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -61,11 +92,42 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pkcs8-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PKCS8 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
container:
|
||||||
|
- alpine:3.10
|
||||||
|
- alpine:3.11
|
||||||
|
- alpine:3.12
|
||||||
|
- alpine:3.13
|
||||||
|
fail-fast: false
|
||||||
|
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_PKCS8 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l /root/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-rfc4716:
|
ssh-rfc4716:
|
||||||
name: Connect to github.com (RFC4716 format)
|
name: Connect to github.com (RFC4716 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -91,11 +153,42 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-rfc4716-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (RFC4716 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
container:
|
||||||
|
- alpine:3.10
|
||||||
|
- alpine:3.11
|
||||||
|
- alpine:3.12
|
||||||
|
- alpine:3.13
|
||||||
|
fail-fast: false
|
||||||
|
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_RFC4716 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l /root/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
|
|
||||||
key_if_exists_replace-key_exists:
|
key_if_exists_replace-key_exists:
|
||||||
name: if_key_exists=replace / key exists
|
name: if_key_exists=replace / key exists
|
||||||
|
@ -122,12 +215,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # replaced
|
key: "dummy" # replaced
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -158,7 +251,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -190,12 +283,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -226,7 +319,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -258,12 +351,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: print created files
|
- name: print created files
|
||||||
|
@ -295,40 +388,9 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.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
|
|
||||||
- name: git clone through SSH # can clone because key of "github.com" always set to "known_hosts"
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
|
|
144
.github/workflows/verify-on-container-centos.yml
vendored
144
.github/workflows/verify-on-container-centos.yml
vendored
|
@ -30,11 +30,41 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pem-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PEM format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
container:
|
||||||
|
- quay.io/centos/centos:centos7
|
||||||
|
- quay.io/centos/centos:stream8
|
||||||
|
fail-fast: false
|
||||||
|
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: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l /root/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-pkcs8:
|
ssh-pkcs8:
|
||||||
name: Connect to github.com (PKCS8 format)
|
name: Connect to github.com (PKCS8 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -59,11 +89,41 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pkcs8-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PKCS8 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
container:
|
||||||
|
- quay.io/centos/centos:centos7
|
||||||
|
- quay.io/centos/centos:stream8
|
||||||
|
fail-fast: false
|
||||||
|
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_PKCS8 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l /root/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-rfc4716:
|
ssh-rfc4716:
|
||||||
name: Connect to github.com (RFC4716 format)
|
name: Connect to github.com (RFC4716 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -88,11 +148,41 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-rfc4716-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (RFC4716 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
container:
|
||||||
|
- quay.io/centos/centos:centos7
|
||||||
|
- quay.io/centos/centos:stream8
|
||||||
|
fail-fast: false
|
||||||
|
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_RFC4716 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l /root/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
|
|
||||||
key_if_exists_replace-key_exists:
|
key_if_exists_replace-key_exists:
|
||||||
name: if_key_exists=replace / key exists
|
name: if_key_exists=replace / key exists
|
||||||
|
@ -118,12 +208,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # replaced
|
key: "dummy" # replaced
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -153,7 +243,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -184,12 +274,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -219,7 +309,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -250,12 +340,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: print created files
|
- name: print created files
|
||||||
|
@ -286,39 +376,9 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
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
|
|
||||||
- name: git clone through SSH # can clone because key of "github.com" always set to "known_hosts"
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
|
|
156
.github/workflows/verify-on-container-ubuntu.yml
vendored
156
.github/workflows/verify-on-container-ubuntu.yml
vendored
|
@ -33,11 +33,44 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pem-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PEM format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
container:
|
||||||
|
- ubuntu:16.04
|
||||||
|
- ubuntu:18.04
|
||||||
|
- ubuntu:20.04
|
||||||
|
- ubuntu:22.04
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- name: Install packages
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt install -y openssh-client git
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l /root/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-pkcs8:
|
ssh-pkcs8:
|
||||||
name: Connect to github.com (PKCS8 format)
|
name: Connect to github.com (PKCS8 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -65,11 +98,44 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pkcs8-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PKCS8 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
container:
|
||||||
|
- ubuntu:16.04
|
||||||
|
- ubuntu:18.04
|
||||||
|
- ubuntu:20.04
|
||||||
|
- ubuntu:22.04
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- name: Install packages
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt install -y openssh-client git
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l /root/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-rfc4716:
|
ssh-rfc4716:
|
||||||
name: Connect to github.com (RFC4716 format)
|
name: Connect to github.com (RFC4716 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -97,11 +163,44 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-rfc4716-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (RFC4716 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container: ${{ matrix.container }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
container:
|
||||||
|
- ubuntu:16.04
|
||||||
|
- ubuntu:18.04
|
||||||
|
- ubuntu:20.04
|
||||||
|
- ubuntu:22.04
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- name: Install packages
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
apt install -y openssh-client git
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l /root/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
|
|
||||||
key_if_exists_replace-key_exists:
|
key_if_exists_replace-key_exists:
|
||||||
name: if_key_exists=replace / key exists
|
name: if_key_exists=replace / key exists
|
||||||
|
@ -130,12 +229,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # replaced
|
key: "dummy" # replaced
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -168,7 +267,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -202,12 +301,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -240,7 +339,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
|
@ -274,12 +373,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: print created files
|
- name: print created files
|
||||||
|
@ -313,42 +412,9 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l /root/.ssh
|
run: ls -l /root/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.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
|
|
||||||
- name: git clone through SSH # can clone because key of "github.com" always set to "known_hosts"
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
|
|
127
.github/workflows/verify-on-ubuntu.yml
vendored
127
.github/workflows/verify-on-ubuntu.yml
vendored
|
@ -15,6 +15,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -22,11 +23,34 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls -l ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pem-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PEM format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-pkcs8:
|
ssh-pkcs8:
|
||||||
name: Connect to github.com (PKCS8 format)
|
name: Connect to github.com (PKCS8 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -44,11 +68,34 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls -l ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pkcs8-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PKCS8 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-rfc4716:
|
ssh-rfc4716:
|
||||||
name: Connect to github.com (RFC4716 format)
|
name: Connect to github.com (RFC4716 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -58,6 +105,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -65,11 +113,35 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls -l ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-rfc4716-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (RFC4716 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-18.04
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
|
|
||||||
ssh-with-name:
|
ssh-with-name:
|
||||||
name: Connect to github.com with name and config
|
name: Connect to github.com with name and config
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -79,6 +151,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -86,7 +159,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
name: ssh_key_name # optional
|
name: ssh_key_name # optional
|
||||||
config: | # optional
|
config: | # optional
|
||||||
Host github
|
Host github
|
||||||
|
@ -107,6 +180,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -114,12 +188,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # replaced
|
key: "dummy" # replaced
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls -l ~/.ssh
|
||||||
|
@ -134,6 +208,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -141,7 +216,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls -l ~/.ssh
|
||||||
|
@ -157,6 +232,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -164,12 +240,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls -l ~/.ssh
|
||||||
|
@ -184,6 +260,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -191,7 +268,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls -l ~/.ssh
|
||||||
|
@ -207,6 +284,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -214,12 +292,12 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: print created files
|
- name: print created files
|
||||||
|
@ -235,6 +313,7 @@ jobs:
|
||||||
os:
|
os:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -242,31 +321,9 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls -l ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
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-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
|
|
||||||
- name: git clone through SSH # can clone because key of "github.com" always set to "known_hosts"
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
|
|
129
.github/workflows/verify-on-windows.yml
vendored
129
.github/workflows/verify-on-windows.yml
vendored
|
@ -22,11 +22,33 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pem-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PEM format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
- windows-2022
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-pkcs8:
|
ssh-pkcs8:
|
||||||
name: Connect to github.com (PKCS8 format)
|
name: Connect to github.com (PKCS8 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -43,11 +65,33 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pkcs8-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (PKCS8 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
- windows-2022
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
ssh-rfc4716:
|
ssh-rfc4716:
|
||||||
name: Connect to github.com (RFC4716 format)
|
name: Connect to github.com (RFC4716 format)
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -64,11 +108,34 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-rfc4716-bitbucket:
|
||||||
|
name: Connect to bitbucket.org (RFC4716 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
- windows-2022
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||||
|
known_hosts: |
|
||||||
|
bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==
|
||||||
|
- name: print created files
|
||||||
|
run: ls ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
||||||
|
|
||||||
ssh-with-name:
|
ssh-with-name:
|
||||||
name: Connect to github.com with name and config
|
name: Connect to github.com with name and config
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
@ -85,7 +152,7 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
name: ssh_key_name # optional
|
name: ssh_key_name # optional
|
||||||
config: | # optional
|
config: | # optional
|
||||||
Host github
|
Host github
|
||||||
|
@ -93,7 +160,7 @@ jobs:
|
||||||
User git
|
User git
|
||||||
IdentityFile ~/.ssh/ssh_key_name
|
IdentityFile ~/.ssh/ssh_key_name
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone github:shimataro/ssh-key-action.git tmp
|
run: git clone github:shimataro/ssh-key-action.git tmp
|
||||||
|
|
||||||
|
@ -113,15 +180,15 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # replaced
|
key: "dummy" # replaced
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
key_if_exists_replace-key_doesnt_exist:
|
key_if_exists_replace-key_doesnt_exist:
|
||||||
|
@ -140,10 +207,10 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: replace
|
if_key_exists: replace
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
|
||||||
|
@ -163,15 +230,15 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
key_if_exists_ignore-key_doesnt_exist:
|
key_if_exists_ignore-key_doesnt_exist:
|
||||||
|
@ -190,10 +257,10 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: ignore
|
if_key_exists: ignore
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
|
||||||
|
@ -213,16 +280,16 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
- name: Install SSH key (replace)
|
- name: Install SSH key (replace)
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: "dummy" # ignored
|
key: "dummy" # ignored
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
key_if_exists_fail-key_doesnt_exist:
|
key_if_exists_fail-key_doesnt_exist:
|
||||||
|
@ -241,31 +308,9 @@ jobs:
|
||||||
uses: ./.
|
uses: ./.
|
||||||
with:
|
with:
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
known_hosts: unnecessary
|
||||||
if_key_exists: fail
|
if_key_exists: fail
|
||||||
- name: print created files
|
- name: print created files
|
||||||
run: ls -l ~/.ssh
|
run: ls ~/.ssh
|
||||||
- name: git clone through SSH
|
- name: git clone through SSH
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
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:
|
|
||||||
- windows-2019
|
|
||||||
- windows-2022
|
|
||||||
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
|
|
||||||
- name: git clone through SSH # can clone because key of "github.com" always set to "known_hosts"
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue