mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
add tests to Windows / macOS
This commit is contained in:
parent
bee47d136c
commit
59768b01da
7 changed files with 559 additions and 307 deletions
74
.github/workflows/verify-on-macos-1015.yml
vendored
74
.github/workflows/verify-on-macos-1015.yml
vendored
|
@ -1,74 +0,0 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
||||||
|
|
||||||
name: macOS Catalina
|
|
||||||
|
|
||||||
on:
|
|
||||||
- push
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ssh-pem:
|
|
||||||
name: Connect to github.com (PEM format)
|
|
||||||
runs-on: macos-10.15
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-pkcs8:
|
|
||||||
name: Connect to github.com (PKCS8 format)
|
|
||||||
runs-on: macos-10.15
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-rfc4716:
|
|
||||||
name: Connect to github.com (RFC4716 format)
|
|
||||||
runs-on: macos-10.15
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-with-name:
|
|
||||||
name: Connect to github.com with name and config
|
|
||||||
runs-on: macos-10.15
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
name: ssh_key_name # optional
|
|
||||||
config: | # optional
|
|
||||||
Host github
|
|
||||||
Hostname github.com
|
|
||||||
User git
|
|
||||||
IdentityFile ~/.ssh/ssh_key_name
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone github:shimataro/ssh-key-action.git tmp
|
|
|
@ -1,6 +1,6 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
name: Ubuntu 16.04
|
name: macOS
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- push
|
- push
|
||||||
|
@ -8,7 +8,12 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
ssh-pem:
|
ssh-pem:
|
||||||
name: Connect to github.com (PEM format)
|
name: Connect to github.com (PEM format)
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -23,7 +28,12 @@ jobs:
|
||||||
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:
|
ssh-pkcs8:
|
||||||
name: Connect to github.com (PKCS8 format)
|
name: Connect to github.com (PKCS8 format)
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -38,7 +48,12 @@ jobs:
|
||||||
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:
|
ssh-rfc4716:
|
||||||
name: Connect to github.com (RFC4716 format)
|
name: Connect to github.com (RFC4716 format)
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -53,7 +68,12 @@ jobs:
|
||||||
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-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: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -75,7 +95,12 @@ jobs:
|
||||||
|
|
||||||
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
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -96,7 +121,12 @@ jobs:
|
||||||
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:
|
||||||
name: if_key_exists=replace / key doesn't exist
|
name: if_key_exists=replace / key doesn't exist
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -113,7 +143,12 @@ jobs:
|
||||||
|
|
||||||
key_if_exists_ignore-key_exists:
|
key_if_exists_ignore-key_exists:
|
||||||
name: if_key_exists=ignore / key exists
|
name: if_key_exists=ignore / key exists
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -134,7 +169,12 @@ jobs:
|
||||||
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:
|
||||||
name: if_key_exists=ignore / key doesn't exist
|
name: if_key_exists=ignore / key doesn't exist
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -151,7 +191,12 @@ jobs:
|
||||||
|
|
||||||
key_if_exists_fail-key_exists:
|
key_if_exists_fail-key_exists:
|
||||||
name: if_key_exists=fail / key exists
|
name: if_key_exists=fail / key exists
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -173,7 +218,12 @@ jobs:
|
||||||
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:
|
||||||
name: if_key_exists=fail / key doesn't exist
|
name: if_key_exists=fail / key doesn't exist
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-10.15
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
74
.github/workflows/verify-on-ubuntu-1804.yml
vendored
74
.github/workflows/verify-on-ubuntu-1804.yml
vendored
|
@ -1,74 +0,0 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
||||||
|
|
||||||
name: Ubuntu 18.04
|
|
||||||
|
|
||||||
on:
|
|
||||||
- push
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ssh-pem:
|
|
||||||
name: Connect to github.com (PEM format)
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-pkcs8:
|
|
||||||
name: Connect to github.com (PKCS8 format)
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-rfc4716:
|
|
||||||
name: Connect to github.com (RFC4716 format)
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-with-name:
|
|
||||||
name: Connect to github.com with name and config
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
name: ssh_key_name # optional
|
|
||||||
config: | # optional
|
|
||||||
Host github
|
|
||||||
Hostname github.com
|
|
||||||
User git
|
|
||||||
IdentityFile ~/.ssh/ssh_key_name
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone github:shimataro/ssh-key-action.git tmp
|
|
74
.github/workflows/verify-on-ubuntu-2004.yml
vendored
74
.github/workflows/verify-on-ubuntu-2004.yml
vendored
|
@ -1,74 +0,0 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
||||||
|
|
||||||
name: Ubuntu 20.04
|
|
||||||
|
|
||||||
on:
|
|
||||||
- push
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ssh-pem:
|
|
||||||
name: Connect to github.com (PEM format)
|
|
||||||
runs-on: 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: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-pkcs8:
|
|
||||||
name: Connect to github.com (PKCS8 format)
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-rfc4716:
|
|
||||||
name: Connect to github.com (RFC4716 format)
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-with-name:
|
|
||||||
name: Connect to github.com with name and config
|
|
||||||
runs-on: 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: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
name: ssh_key_name # optional
|
|
||||||
config: | # optional
|
|
||||||
Host github
|
|
||||||
Hostname github.com
|
|
||||||
User git
|
|
||||||
IdentityFile ~/.ssh/ssh_key_name
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone github:shimataro/ssh-key-action.git tmp
|
|
259
.github/workflows/verify-on-ubuntu.yml
vendored
Normal file
259
.github/workflows/verify-on-ubuntu.yml
vendored
Normal file
|
@ -0,0 +1,259 @@
|
||||||
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
|
name: Ubuntu
|
||||||
|
|
||||||
|
on:
|
||||||
|
- push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ssh-pem:
|
||||||
|
name: Connect to github.com (PEM format)
|
||||||
|
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: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pkcs8:
|
||||||
|
name: Connect to github.com (PKCS8 format)
|
||||||
|
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_PKCS8 }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-rfc4716:
|
||||||
|
name: Connect to github.com (RFC4716 format)
|
||||||
|
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_RFC4716 }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-with-name:
|
||||||
|
name: Connect to github.com with name and config
|
||||||
|
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: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
name: ssh_key_name # optional
|
||||||
|
config: | # optional
|
||||||
|
Host github
|
||||||
|
Hostname github.com
|
||||||
|
User git
|
||||||
|
IdentityFile ~/.ssh/ssh_key_name
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone github:shimataro/ssh-key-action.git tmp
|
||||||
|
|
||||||
|
key_if_exists_replace-key_exists:
|
||||||
|
name: if_key_exists=replace / key exists
|
||||||
|
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 (dummy)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: "dummy" # replaced
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: Install SSH key (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: replace
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
key_if_exists_replace-key_doesnt_exist:
|
||||||
|
name: if_key_exists=replace / key doesn't exist
|
||||||
|
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 (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: replace
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
|
||||||
|
key_if_exists_ignore-key_exists:
|
||||||
|
name: if_key_exists=ignore / key exists
|
||||||
|
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 (dummy)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: Install SSH key (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: "dummy" # ignored
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: ignore
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
key_if_exists_ignore-key_doesnt_exist:
|
||||||
|
name: if_key_exists=ignore / key doesn't exist
|
||||||
|
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 (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: ignore
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
|
||||||
|
key_if_exists_fail-key_exists:
|
||||||
|
name: if_key_exists=fail / key exists
|
||||||
|
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 (dummy)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: Install SSH key (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: "dummy" # ignored
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: fail
|
||||||
|
continue-on-error: true
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
key_if_exists_fail-key_doesnt_exist:
|
||||||
|
name: if_key_exists=fail / key doesn't exist
|
||||||
|
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 (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: fail
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
@ -1,74 +0,0 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
||||||
|
|
||||||
name: Windows Server 2019
|
|
||||||
|
|
||||||
on:
|
|
||||||
- push
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ssh-pem:
|
|
||||||
name: Connect to github.com (PEM format)
|
|
||||||
runs-on: windows-2019
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-pkcs8:
|
|
||||||
name: Connect to github.com (PKCS8 format)
|
|
||||||
runs-on: windows-2019
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-rfc4716:
|
|
||||||
name: Connect to github.com (RFC4716 format)
|
|
||||||
runs-on: windows-2019
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
- name: print created files
|
|
||||||
run: ls ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
ssh-with-name:
|
|
||||||
name: Connect to github.com with name and config
|
|
||||||
runs-on: windows-2019
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
||||||
name: ssh_key_name # optional
|
|
||||||
config: | # optional
|
|
||||||
Host github
|
|
||||||
Hostname github.com
|
|
||||||
User git
|
|
||||||
IdentityFile ~/.ssh/ssh_key_name
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone github:shimataro/ssh-key-action.git tmp
|
|
239
.github/workflows/verify-on-windows.yml
vendored
Normal file
239
.github/workflows/verify-on-windows.yml
vendored
Normal file
|
@ -0,0 +1,239 @@
|
||||||
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
|
name: Windows
|
||||||
|
|
||||||
|
on:
|
||||||
|
- push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ssh-pem:
|
||||||
|
name: Connect to github.com (PEM format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: print created files
|
||||||
|
run: ls ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-pkcs8:
|
||||||
|
name: Connect to github.com (PKCS8 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: print created files
|
||||||
|
run: ls ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-rfc4716:
|
||||||
|
name: Connect to github.com (RFC4716 format)
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: print created files
|
||||||
|
run: ls ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
ssh-with-name:
|
||||||
|
name: Connect to github.com with name and config
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
name: ssh_key_name # optional
|
||||||
|
config: | # optional
|
||||||
|
Host github
|
||||||
|
Hostname github.com
|
||||||
|
User git
|
||||||
|
IdentityFile ~/.ssh/ssh_key_name
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone github:shimataro/ssh-key-action.git tmp
|
||||||
|
|
||||||
|
key_if_exists_replace-key_exists:
|
||||||
|
name: if_key_exists=replace / key exists
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key (dummy)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: "dummy" # replaced
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: Install SSH key (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: replace
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
key_if_exists_replace-key_doesnt_exist:
|
||||||
|
name: if_key_exists=replace / key doesn't exist
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: replace
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
|
||||||
|
key_if_exists_ignore-key_exists:
|
||||||
|
name: if_key_exists=ignore / key exists
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key (dummy)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: Install SSH key (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: "dummy" # ignored
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: ignore
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
key_if_exists_ignore-key_doesnt_exist:
|
||||||
|
name: if_key_exists=ignore / key doesn't exist
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: ignore
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
|
||||||
|
key_if_exists_fail-key_exists:
|
||||||
|
name: if_key_exists=fail / key exists
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key (dummy)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
- name: Install SSH key (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: "dummy" # ignored
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: fail
|
||||||
|
continue-on-error: true
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||||
|
key_if_exists_fail-key_doesnt_exist:
|
||||||
|
name: if_key_exists=fail / key doesn't exist
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-2019
|
||||||
|
steps:
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Install SSH key (replace)
|
||||||
|
uses: ./.
|
||||||
|
with:
|
||||||
|
key: ${{ secrets.SSH_KEY_PEM }}
|
||||||
|
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||||
|
if_key_exists: fail
|
||||||
|
- name: print created files
|
||||||
|
run: ls -l ~/.ssh
|
||||||
|
- name: git clone through SSH
|
||||||
|
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
Loading…
Add table
Add a link
Reference in a new issue