1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00
ssh-key-action/.github/workflows/verify-on-macos-1015.yml
shimataro e83b5ac86d
support OpenSSH key format (#171)
* Make up for LF in last line of SSH key file

* refactor insertLf()

* add test for OpenSSH format

* add PKCS8 format

* apply to other virtual machines

* update README

* update CHANGELOG

Co-authored-by: Tatsunori Uchino <tats.u@live.jp>
2021-02-23 10:22:30 +09:00

74 lines
2.1 KiB
YAML

# 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