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
144
.github/workflows/verify-on-container-centos.yml
vendored
144
.github/workflows/verify-on-container-centos.yml
vendored
|
@ -30,11 +30,41 @@ jobs:
|
|||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
- name: git clone through SSH
|
||||
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:
|
||||
name: Connect to github.com (PKCS8 format)
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
@ -59,11 +89,41 @@ jobs:
|
|||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
- name: git clone through SSH
|
||||
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:
|
||||
name: Connect to github.com (RFC4716 format)
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
@ -88,11 +148,41 @@ jobs:
|
|||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
- name: git clone through SSH
|
||||
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:
|
||||
name: if_key_exists=replace / key exists
|
||||
|
@ -118,12 +208,12 @@ jobs:
|
|||
uses: ./.
|
||||
with:
|
||||
key: "dummy" # replaced
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
- name: Install SSH key (replace)
|
||||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
if_key_exists: replace
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
|
@ -153,7 +243,7 @@ jobs:
|
|||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
if_key_exists: replace
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
|
@ -184,12 +274,12 @@ jobs:
|
|||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
- name: Install SSH key (replace)
|
||||
uses: ./.
|
||||
with:
|
||||
key: "dummy" # ignored
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
if_key_exists: ignore
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
|
@ -219,7 +309,7 @@ jobs:
|
|||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
if_key_exists: ignore
|
||||
- name: print created files
|
||||
run: ls -l /root/.ssh
|
||||
|
@ -250,12 +340,12 @@ jobs:
|
|||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
- name: Install SSH key (replace)
|
||||
uses: ./.
|
||||
with:
|
||||
key: "dummy" # ignored
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
if_key_exists: fail
|
||||
continue-on-error: true
|
||||
- name: print created files
|
||||
|
@ -286,39 +376,9 @@ jobs:
|
|||
uses: ./.
|
||||
with:
|
||||
key: ${{ secrets.SSH_KEY_PEM }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
known_hosts: unnecessary
|
||||
if_key_exists: fail
|
||||
- name: print created files
|
||||
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-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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue