Skip to content

Commit

Permalink
Merge pull request #230 from shimataro/develop
Browse files Browse the repository at this point in the history
version 2.5.0
  • Loading branch information
shimataro committed Dec 24, 2022
2 parents 86a65fd + 7036694 commit 02d189f
Show file tree
Hide file tree
Showing 16 changed files with 1,581 additions and 2,861 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Expand Up @@ -161,7 +161,7 @@ rules: # https://eslint.org/docs/rules/
- error
- max: 1
no-native-reassign: error
no-negated-condition: error
no-negated-condition: 'off'
no-negated-in-lhs: error
no-nested-ternary: error
no-new: error
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -27,9 +27,9 @@ jobs:
- name: Turn off auto-crlf
run: git config --global core.autocrlf false
- name: Checkout source codes
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodejs }}
- name: Install dependencies
Expand Down
272 changes: 272 additions & 0 deletions .github/workflows/reusable-verify.yml
@@ -0,0 +1,272 @@
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
name: Reusable workflow (verify)

on:
workflow_call:
inputs:
os:
required: true
type: string
description: host OS that CI 'runs-on'
docker_image:
required: false
type: string
default: ""
description: Docker image name
package_installation_command:
required: false
type: string
default: ""
description: package installation command
secrets:
SSH_KEY_PEM:
required: true
description: SSH private key (PEM format)
SSH_KEY_PKCS8:
required: true
description: SSH private key (PKCS8 format)
SSH_KEY_RFC4716:
required: true
description: SSH private key (RFC4716 format)

jobs:
ssh-pem:
name: Connect to github.com (PEM format)
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
- 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- 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: 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PKCS8 }}
known_hosts: unnecessary
- 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- 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: 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key
uses: ./.
with:
key: ${{ secrets.SSH_KEY_RFC4716 }}
known_hosts: unnecessary
- 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- 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: 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
runs-on: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key (dummy)
uses: ./.
with:
key: "dummy" # replaced
known_hosts: unnecessary
- name: Install SSH key (replace)
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
if_key_exists: replace
- 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key (replace)
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
if_key_exists: replace
- 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key (dummy)
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
- name: Install SSH key (replace)
uses: ./.
with:
key: "dummy" # ignored
known_hosts: unnecessary
if_key_exists: ignore
- 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key (replace)
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
if_key_exists: ignore
- 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key (dummy)
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
- name: Install SSH key (replace)
uses: ./.
with:
key: "dummy" # ignored
known_hosts: unnecessary
if_key_exists: fail
continue-on-error: true
- 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: ${{ inputs.os }}
container: ${{ inputs.docker_image }}
steps:
- name: Install packages
run: ${{ inputs.package_installation_command }}
if: ${{ inputs.package_installation_command != '' }}
- name: Checkout source codes
uses: actions/checkout@v3
- name: Install SSH key (replace)
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
if_key_exists: fail
- name: git clone through SSH
run: git clone git@github.com:shimataro/ssh-key-action.git tmp

0 comments on commit 02d189f

Please sign in to comment.