Skip to content

Commit

Permalink
Merge pull request #138 from shimataro/develop
Browse files Browse the repository at this point in the history
version 2.0.3
  • Loading branch information
shimataro authored Jun 6, 2020
2 parents 147b45c + be59087 commit 8ddce4e
Show file tree
Hide file tree
Showing 20 changed files with 1,326 additions and 603 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

on: push
name: Build

on:
- push
- pull_request

jobs:
build:
name: Build on ${{ matrix.os }} / Node.js v${{ matrix.nodejs }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

on: push
name: macOS
name: macOS Catalina

on:
- push
- pull_request

jobs:
ssh:
name: Connect to github.com
runs-on: macos-latest
runs-on: macos-10.15
steps:
- name: Checkout source codes
uses: actions/checkout@v2
Expand All @@ -20,7 +24,7 @@ jobs:
run: git clone [email protected]:shimataro/ssh-key-action.git tmp
ssh-with-name:
name: Connect to github.com with name and config
runs-on: macos-latest
runs-on: macos-10.15
steps:
- name: Checkout source codes
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

on: push
name: Ubuntu 16.04

on:
- push
- pull_request

jobs:
ssh:
name: Connect to github.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

on: push
name: Ubuntu
name: Ubuntu 18.04

on:
- push
- pull_request

jobs:
ssh:
name: Connect to github.com
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- name: Checkout source codes
uses: actions/checkout@v2
Expand All @@ -20,7 +24,7 @@ jobs:
run: git clone [email protected]:shimataro/ssh-key-action.git tmp
ssh-with-name:
name: Connect to github.com with name and config
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
steps:
- name: Checkout source codes
uses: actions/checkout@v2
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/verify-on-ubuntu-2004.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

name: Ubuntu 20.04

on:
- push
- pull_request

jobs:
ssh:
name: Connect to github.com
runs-on: ubuntu-20.04
steps:
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: print created files
run: ls -l ~/.ssh
- name: git clone through SSH
run: git clone [email protected]: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 }}
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# https://help.github.com/en/articles/workflow-syntax-for-github-actions

on: push
name: Windows
name: Windows Server 2019

on:
- push
- pull_request

jobs:
ssh:
name: Connect to github.com
runs-on: windows-latest
runs-on: windows-2019
steps:
- name: Checkout source codes
uses: actions/checkout@v2
Expand All @@ -20,7 +24,7 @@ jobs:
run: git clone [email protected]:shimataro/ssh-key-action.git tmp
ssh-with-name:
name: Connect to github.com with name and config
runs-on: windows-latest
runs-on: windows-2019
steps:
- name: Checkout source codes
uses: actions/checkout@v2
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.0.3] - 2020-06-06

### Added

* Ubuntu 20.04

### Changed

* Add short note on how to convert OPENSSH to PEM format by [@shadow1runner](https://github.com/shadow1runner)

## [2.0.2] - 2020-04-12

### Security
Expand Down Expand Up @@ -103,7 +113,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

* First release.

[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v2.0.2...HEAD
[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v2.0.3...HEAD
[2.0.3]: https://github.com/shimataro/ssh-key-action/compare/v2.0.2...v2.0.3
[2.0.2]: https://github.com/shimataro/ssh-key-action/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/shimataro/ssh-key-action/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/shimataro/ssh-key-action/compare/v1.6.5...v2.0.0
Expand Down
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Install SSH Key

[![Build][image-build]][link-build]
[![Windows][image-verify-windows]][link-verify-windows]
[![macOS][image-verify-macos]][link-verify-macos]
[![Ubuntu][image-verify-ubuntu]][link-verify-ubuntu]
[![Ubuntu 16.04][image-verify-ubuntu1604]][link-verify-ubuntu1604]
[![Windows Server 2019][image-verify-windows-2019]][link-verify-windows-2019]
[![macOS Catalina][image-verify-macos-1015]][link-verify-macos-1015]
[![Ubuntu 20.04][image-verify-ubuntu-2004]][link-verify-ubuntu-2004]
[![Ubuntu 18.04][image-verify-ubuntu-1804]][link-verify-ubuntu-1804]
[![Ubuntu 16.04][image-verify-ubuntu-1604]][link-verify-ubuntu-1604]
[![Release][image-release]][link-release]
[![License][image-license]][link-license]
[![Stars][image-stars]][link-stars]
Expand All @@ -13,13 +14,16 @@ This action installs SSH key in `~/.ssh`.

Useful for SCP, SFTP, and `rsync` over SSH in deployment script.

**Works on all [virtual environment](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources) -- Windows, macOS, Ubuntu and Ubuntu 16.04.**
**Works on all [virtual environments](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources) --**
**Windows Server 2019, macOS Catalina, Ubuntu 20.04, Ubuntu 18.04, and Ubuntu 16.04.**

## Usage

Add your SSH key to your product secrets by clicking `Settings` - `Secrets` - `Add a new secret` beforehand.

**NOTE:** OPENSSH format (key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`) may not work due to OpenSSH version on VM. Please use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`) instead.
**NOTE:** OPENSSH format (key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`) may not work due to OpenSSH version on VM.
Please use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`) instead.
In order to convert your key inline to PEM format simply use `ssh-keygen -p -m PEM -f ~/.ssh/id_rsa`.

```yaml
runs-on: ubuntu-latest
Expand Down Expand Up @@ -78,11 +82,11 @@ steps:

### SSH failed even though key has been installed.

Check belows:
Check below:

* `Load key "/HOME/.ssh/id_rsa": invalid format`:
* OPENSSH format (key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`) may not work.
* Use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`).
* Use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`). Convert it from OPENSSH format using `ssh-keygen -p -m PEM -f ~/.ssh/id_rsa`
* `Host key verification failed.`:
* Set `known_hosts` option correctly (use `ssh-keyscan` command).

Expand Down Expand Up @@ -130,14 +134,16 @@ See [CHANGELOG.md](CHANGELOG.md).

[image-build]: https://github.com/shimataro/ssh-key-action/workflows/Build/badge.svg?event=push&branch=v2
[link-build]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3ABuild
[image-verify-windows]: https://github.com/shimataro/ssh-key-action/workflows/Windows/badge.svg?event=push&branch=v2
[link-verify-windows]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3AWindows
[image-verify-macos]: https://github.com/shimataro/ssh-key-action/workflows/macOS/badge.svg?event=push&branch=v2
[link-verify-macos]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3AmacOS
[image-verify-ubuntu]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu/badge.svg?event=push&branch=v2
[link-verify-ubuntu]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3AUbuntu
[image-verify-ubuntu1604]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu%2016.04/badge.svg?event=push&branch=v2
[link-verify-ubuntu1604]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22Ubuntu+16.04%22
[image-verify-windows-2019]: https://github.com/shimataro/ssh-key-action/workflows/Windows%20Server%202019/badge.svg?event=push&branch=v2
[link-verify-windows-2019]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22Windows+Server+2019%22
[image-verify-macos-1015]: https://github.com/shimataro/ssh-key-action/workflows/macOS%20Catalina/badge.svg?event=push&branch=v2
[link-verify-macos-1015]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22macOS+Catalina%22
[image-verify-ubuntu-2004]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu%2020.04/badge.svg?event=push&branch=v2
[link-verify-ubuntu-2004]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22Ubuntu+20.04%22
[image-verify-ubuntu-1804]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu%2018.04/badge.svg?event=push&branch=v2
[link-verify-ubuntu-1804]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22Ubuntu+18.04%22
[image-verify-ubuntu-1604]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu%2016.04/badge.svg?event=push&branch=v2
[link-verify-ubuntu-1604]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22Ubuntu+16.04%22
[image-release]: https://img.shields.io/github/release/shimataro/ssh-key-action.svg
[link-release]: https://github.com/shimataro/ssh-key-action/releases
[image-license]: https://img.shields.io/github/license/shimataro/ssh-key-action.svg
Expand Down
22 changes: 17 additions & 5 deletions lib/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/main.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions node_modules/@actions/core/lib/command.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions node_modules/@actions/core/lib/command.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8ddce4e

Please sign in to comment.