From f7c46b12d805845a8d6e38ef06a8debdf6b404ce Mon Sep 17 00:00:00 2001 From: shimataro Date: Tue, 31 Dec 2019 10:56:18 +0900 Subject: [PATCH] Feature/badges (#52) * * use different actions for verify * * add badges for every platforms --- .github/workflows/verify-on-linux.yml | 39 +++++++++++++++++++ .github/workflows/verify-on-macos.yml | 39 +++++++++++++++++++ .github/workflows/verify-on-windows.yml | 39 +++++++++++++++++++ .../workflows/{verify.yml => verify.yml.bak} | 0 README.md | 12 ++++-- 5 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/verify-on-linux.yml create mode 100644 .github/workflows/verify-on-macos.yml create mode 100644 .github/workflows/verify-on-windows.yml rename .github/workflows/{verify.yml => verify.yml.bak} (100%) diff --git a/.github/workflows/verify-on-linux.yml b/.github/workflows/verify-on-linux.yml new file mode 100644 index 0000000..14b326d --- /dev/null +++ b/.github/workflows/verify-on-linux.yml @@ -0,0 +1,39 @@ +# https://help.github.com/en/articles/workflow-syntax-for-github-actions + +on: push +name: Linux +jobs: + ssh: + name: Connect to github.com + runs-on: ubuntu-latest + steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@HEAD + with: + private-key: ${{ secrets.SSH_KEY }} + public-key: ${{ secrets.SSH_KEY_PUBLIC }} + known-hosts: ${{ secrets.KNOWN_HOSTS }} # optional + - 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-latest + steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@HEAD + with: + private-key: ${{ secrets.SSH_KEY }} + public-key: ${{ secrets.SSH_KEY_PUBLIC }} + known-hosts: ${{ secrets.KNOWN_HOSTS }} # optional + 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 diff --git a/.github/workflows/verify-on-macos.yml b/.github/workflows/verify-on-macos.yml new file mode 100644 index 0000000..cc2420d --- /dev/null +++ b/.github/workflows/verify-on-macos.yml @@ -0,0 +1,39 @@ +# https://help.github.com/en/articles/workflow-syntax-for-github-actions + +on: push +name: macOS +jobs: + ssh: + name: Connect to github.com + runs-on: macos-latest + steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@HEAD + with: + private-key: ${{ secrets.SSH_KEY }} + public-key: ${{ secrets.SSH_KEY_PUBLIC }} + known-hosts: ${{ secrets.KNOWN_HOSTS }} # optional + - 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-latest + steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@HEAD + with: + private-key: ${{ secrets.SSH_KEY }} + public-key: ${{ secrets.SSH_KEY_PUBLIC }} + known-hosts: ${{ secrets.KNOWN_HOSTS }} # optional + 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 diff --git a/.github/workflows/verify-on-windows.yml b/.github/workflows/verify-on-windows.yml new file mode 100644 index 0000000..5db775d --- /dev/null +++ b/.github/workflows/verify-on-windows.yml @@ -0,0 +1,39 @@ +# https://help.github.com/en/articles/workflow-syntax-for-github-actions + +on: push +name: Windows +jobs: + ssh: + name: Connect to github.com + runs-on: windows-latest + steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@HEAD + with: + private-key: ${{ secrets.SSH_KEY }} + public-key: ${{ secrets.SSH_KEY_PUBLIC }} + known-hosts: ${{ secrets.KNOWN_HOSTS }} # optional + - 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-latest + steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@HEAD + with: + private-key: ${{ secrets.SSH_KEY }} + public-key: ${{ secrets.SSH_KEY_PUBLIC }} + known-hosts: ${{ secrets.KNOWN_HOSTS }} # optional + 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 ~/.ssh + - name: git clone through SSH + run: git clone github:shimataro/ssh-key-action.git tmp diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml.bak similarity index 100% rename from .github/workflows/verify.yml rename to .github/workflows/verify.yml.bak diff --git a/README.md b/README.md index e07a921..97b783c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Install SSH key [![Build][image-build]][link-build] -[![Connection test][image-connection-test]][link-connection-test] +[![Windows][image-verify-windows]][link-verify-windows] +[![macOS][image-verify-macos]][link-verify-macos] +[![Linux][image-verify-linux]][link-verify-linux] [![Release][image-release]][link-release] [![License][image-license]][link-license] @@ -83,8 +85,12 @@ See [CHANGELOG.md](CHANGELOG.md). [image-build]: https://github.com/shimataro/ssh-key-action/workflows/Build/badge.svg [link-build]: https://github.com/shimataro/ssh-key-action -[image-connection-test]: https://github.com/shimataro/ssh-key-action/workflows/Connection%20test/badge.svg -[link-connection-test]: https://github.com/shimataro/ssh-key-action +[image-verify-windows]: https://github.com/shimataro/ssh-key-action/workflows/Windows/badge.svg +[image-verify-macos]: https://github.com/shimataro/ssh-key-action/workflows/macOS/badge.svg +[image-verify-linux]: https://github.com/shimataro/ssh-key-action/workflows/Linux/badge.svg +[link-verify-windows]: https://github.com/shimataro/ssh-key-action +[link-verify-macos]: https://github.com/shimataro/ssh-key-action +[link-verify-linux]: https://github.com/shimataro/ssh-key-action [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