mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
commit
02d189fc92
16 changed files with 1583 additions and 2863 deletions
|
@ -161,7 +161,7 @@ rules: # https://eslint.org/docs/rules/
|
||||||
- error
|
- error
|
||||||
- max: 1
|
- max: 1
|
||||||
no-native-reassign: error
|
no-native-reassign: error
|
||||||
no-negated-condition: error
|
no-negated-condition: 'off'
|
||||||
no-negated-in-lhs: error
|
no-negated-in-lhs: error
|
||||||
no-nested-ternary: error
|
no-nested-ternary: error
|
||||||
no-new: error
|
no-new: error
|
||||||
|
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -27,9 +27,9 @@ jobs:
|
||||||
- name: Turn off auto-crlf
|
- name: Turn off auto-crlf
|
||||||
run: git config --global core.autocrlf false
|
run: git config --global core.autocrlf false
|
||||||
- name: Checkout source codes
|
- name: Checkout source codes
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.nodejs }}
|
node-version: ${{ matrix.nodejs }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
272
.github/workflows/reusable-verify.yml
vendored
Normal file
272
.github/workflows/reusable-verify.yml
vendored
Normal file
|
@ -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
|
387
.github/workflows/verify-on-container-alpine.yml
vendored
387
.github/workflows/verify-on-container-alpine.yml
vendored
|
@ -1,199 +1,12 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
name: Docker container (Alpine Linux)
|
name: Docker container (Alpine Linux)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ssh-pem:
|
verify:
|
||||||
name: Connect to github.com (PEM format)
|
name: Verify
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -201,196 +14,14 @@ jobs:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
container:
|
docker_image:
|
||||||
- alpine:3.10
|
- alpine:3.10
|
||||||
- alpine:3.11
|
- alpine:3.11
|
||||||
- alpine:3.12
|
- alpine:3.12
|
||||||
- alpine:3.13
|
- alpine:3.13
|
||||||
steps:
|
uses: "./.github/workflows/reusable-verify.yml"
|
||||||
- name: Install packages
|
with:
|
||||||
run: apk add openssh-client git
|
os: ${{ matrix.os }}
|
||||||
- name: Checkout source codes
|
docker_image: ${{ matrix.docker_image }}
|
||||||
uses: actions/checkout@v2
|
package_installation_command: apk add openssh-client git
|
||||||
- name: Install SSH key (dummy)
|
secrets: inherit
|
||||||
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: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: replace
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: ignore
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- alpine:3.10
|
|
||||||
- alpine:3.11
|
|
||||||
- alpine:3.12
|
|
||||||
- alpine:3.13
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: apk add openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: fail
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
|
|
377
.github/workflows/verify-on-container-centos.yml
vendored
377
.github/workflows/verify-on-container-centos.yml
vendored
|
@ -1,193 +1,12 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
name: Docker container (CentOS)
|
name: Docker container (CentOS)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ssh-pem:
|
verify:
|
||||||
name: Connect to github.com (PEM format)
|
name: Verify
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -195,190 +14,12 @@ jobs:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
container:
|
docker_image:
|
||||||
- quay.io/centos/centos:centos7
|
- quay.io/centos/centos:centos7
|
||||||
- quay.io/centos/centos:stream8
|
- quay.io/centos/centos:stream8
|
||||||
steps:
|
uses: "./.github/workflows/reusable-verify.yml"
|
||||||
- name: Install packages
|
with:
|
||||||
run: |
|
os: ${{ matrix.os }}
|
||||||
yum install -y git openssh-clients
|
docker_image: ${{ matrix.docker_image }}
|
||||||
- name: Checkout source codes
|
package_installation_command: yum install -y git openssh-clients
|
||||||
uses: actions/checkout@v2
|
secrets: inherit
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: replace
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: ignore
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- quay.io/centos/centos:centos7
|
|
||||||
- quay.io/centos/centos:stream8
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
yum install -y git openssh-clients
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: fail
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
|
|
409
.github/workflows/verify-on-container-ubuntu.yml
vendored
409
.github/workflows/verify-on-container-ubuntu.yml
vendored
|
@ -1,211 +1,12 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
name: Docker container (Ubuntu)
|
name: Docker container (Ubuntu)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ssh-pem:
|
verify:
|
||||||
name: Connect to github.com (PEM format)
|
name: Verify
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -213,208 +14,16 @@ jobs:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
container:
|
docker_image:
|
||||||
- ubuntu:16.04
|
- ubuntu:16.04
|
||||||
- ubuntu:18.04
|
- ubuntu:18.04
|
||||||
- ubuntu:20.04
|
- ubuntu:20.04
|
||||||
- ubuntu:22.04
|
- ubuntu:22.04
|
||||||
steps:
|
uses: "./.github/workflows/reusable-verify.yml"
|
||||||
- name: Install packages
|
with:
|
||||||
run: |
|
os: ${{ matrix.os }}
|
||||||
|
docker_image: ${{ matrix.docker_image }}
|
||||||
|
package_installation_command: |
|
||||||
apt update
|
apt update
|
||||||
apt install -y openssh-client git
|
apt install -y openssh-client git
|
||||||
- name: Checkout source codes
|
secrets: inherit
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: replace
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: ignore
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l /root/.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 }}
|
|
||||||
container: ${{ matrix.container }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
container:
|
|
||||||
- ubuntu:16.04
|
|
||||||
- ubuntu:18.04
|
|
||||||
- ubuntu:20.04
|
|
||||||
- ubuntu:22.04
|
|
||||||
steps:
|
|
||||||
- name: Install packages
|
|
||||||
run: |
|
|
||||||
apt update
|
|
||||||
apt install -y openssh-client git
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: fail
|
|
||||||
- name: print created files
|
|
||||||
run: ls -l /root/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
|
|
321
.github/workflows/verify-on-macos.yml
vendored
321
.github/workflows/verify-on-macos.yml
vendored
|
@ -1,14 +1,12 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
name: macOS
|
name: macOS
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ssh-pem:
|
verify:
|
||||||
name: Connect to github.com (PEM format)
|
name: Verify
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -16,314 +14,7 @@ jobs:
|
||||||
- macos-10.15
|
- macos-10.15
|
||||||
- macos-11
|
- macos-11
|
||||||
- macos-12
|
- macos-12
|
||||||
steps:
|
uses: "./.github/workflows/reusable-verify.yml"
|
||||||
- name: Checkout source codes
|
with:
|
||||||
uses: actions/checkout@v2
|
os: ${{ matrix.os }}
|
||||||
- name: Install SSH key
|
secrets: inherit
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- 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-pem-bitbucket:
|
|
||||||
name: Connect to bitbucket.org (PEM format)
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- 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-bitbucket:
|
|
||||||
name: Connect to bitbucket.org (PKCS8 format)
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- 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-bitbucket:
|
|
||||||
name: Connect to bitbucket.org (RFC4716 format)
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@bitbucket.org:shimataro999/ssh-test.git tmp
|
|
||||||
|
|
||||||
ssh-with-name:
|
|
||||||
name: Connect to github.com with name and config
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
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:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: 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:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
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:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: 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:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
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:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: 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:
|
|
||||||
- macos-10.15
|
|
||||||
- macos-11
|
|
||||||
- macos-12
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
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
|
|
||||||
|
|
321
.github/workflows/verify-on-ubuntu.yml
vendored
321
.github/workflows/verify-on-ubuntu.yml
vendored
|
@ -1,14 +1,12 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
name: Ubuntu
|
name: Ubuntu
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ssh-pem:
|
verify:
|
||||||
name: Connect to github.com (PEM format)
|
name: Verify
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -16,314 +14,7 @@ jobs:
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- ubuntu-20.04
|
- ubuntu-20.04
|
||||||
- ubuntu-22.04
|
- ubuntu-22.04
|
||||||
steps:
|
uses: "./.github/workflows/reusable-verify.yml"
|
||||||
- name: Checkout source codes
|
with:
|
||||||
uses: actions/checkout@v2
|
os: ${{ matrix.os }}
|
||||||
- name: Install SSH key
|
secrets: inherit
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- 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-pem-bitbucket:
|
|
||||||
name: Connect to bitbucket.org (PEM format)
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- 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-bitbucket:
|
|
||||||
name: Connect to bitbucket.org (PKCS8 format)
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- 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-bitbucket:
|
|
||||||
name: Connect to bitbucket.org (RFC4716 format)
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- ubuntu-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls -l ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@bitbucket.org:shimataro999/ssh-test.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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: 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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: 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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: 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-18.04
|
|
||||||
- ubuntu-20.04
|
|
||||||
- ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
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
|
|
||||||
|
|
309
.github/workflows/verify-on-windows.yml
vendored
309
.github/workflows/verify-on-windows.yml
vendored
|
@ -1,316 +1,19 @@
|
||||||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
|
||||||
name: Windows
|
name: Windows
|
||||||
|
|
||||||
on:
|
on:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ssh-pem:
|
verify:
|
||||||
name: Connect to github.com (PEM format)
|
name: Verify
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
- windows-2019
|
- windows-2019
|
||||||
- windows-2022
|
- windows-2022
|
||||||
steps:
|
uses: "./.github/workflows/reusable-verify.yml"
|
||||||
- name: Checkout source codes
|
with:
|
||||||
uses: actions/checkout@v2
|
os: ${{ matrix.os }}
|
||||||
- name: Install SSH key
|
secrets: inherit
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- 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-pem-bitbucket:
|
|
||||||
name: Connect to bitbucket.org (PEM format)
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- windows-2019
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls ~/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- windows-2019
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PKCS8 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- 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-bitbucket:
|
|
||||||
name: Connect to bitbucket.org (PKCS8 format)
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- windows-2019
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls ~/.ssh
|
|
||||||
- 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: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- windows-2019
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_RFC4716 }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
- 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-bitbucket:
|
|
||||||
name: Connect to bitbucket.org (RFC4716 format)
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os:
|
|
||||||
- windows-2019
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@bitbucket.org:shimataro999/ssh-test.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
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
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
|
|
||||||
|
|
||||||
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
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls ~/.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
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: replace
|
|
||||||
- name: print created files
|
|
||||||
run: ls ~/.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
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls ~/.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
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: ignore
|
|
||||||
- name: print created files
|
|
||||||
run: ls ~/.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
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- 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: print created files
|
|
||||||
run: ls ~/.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
|
|
||||||
- windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Checkout source codes
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Install SSH key (replace)
|
|
||||||
uses: ./.
|
|
||||||
with:
|
|
||||||
key: ${{ secrets.SSH_KEY_PEM }}
|
|
||||||
known_hosts: unnecessary
|
|
||||||
if_key_exists: fail
|
|
||||||
- name: print created files
|
|
||||||
run: ls ~/.ssh
|
|
||||||
- name: git clone through SSH
|
|
||||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
|
||||||
|
|
|
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2.5.0] - 2022-12-24
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* remove SSH directory at the end of workflow
|
||||||
|
|
||||||
## [2.4.0] - 2022-11-03
|
## [2.4.0] - 2022-11-03
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -174,7 +180,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||||
|
|
||||||
* First release.
|
* First release.
|
||||||
|
|
||||||
[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v2.4.0...HEAD
|
[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v2.5.0...HEAD
|
||||||
|
[2.5.0]: https://github.com/shimataro/ssh-key-action/compare/v2.4.0...v2.5.0
|
||||||
[2.4.0]: https://github.com/shimataro/ssh-key-action/compare/v2.3.1...v2.4.0
|
[2.4.0]: https://github.com/shimataro/ssh-key-action/compare/v2.3.1...v2.4.0
|
||||||
[2.3.1]: https://github.com/shimataro/ssh-key-action/compare/v2.3.0...v2.3.1
|
[2.3.1]: https://github.com/shimataro/ssh-key-action/compare/v2.3.0...v2.3.1
|
||||||
[2.3.0]: https://github.com/shimataro/ssh-key-action/compare/v2.2.0...v2.3.0
|
[2.3.0]: https://github.com/shimataro/ssh-key-action/compare/v2.2.0...v2.3.0
|
||||||
|
|
|
@ -45,7 +45,10 @@ steps:
|
||||||
|
|
||||||
See [Workflow syntax for GitHub Actions](https://help.github.com/en/articles/workflow-syntax-for-github-actions) for details.
|
See [Workflow syntax for GitHub Actions](https://help.github.com/en/articles/workflow-syntax-for-github-actions) for details.
|
||||||
|
|
||||||
**NOTE:** Server key of `github.com` will be always set to `known_hosts`.
|
**NOTE:**
|
||||||
|
|
||||||
|
* Server key of `github.com` will be always set to `known_hosts`.
|
||||||
|
* SSH keys will be removed at the end of workflow.
|
||||||
|
|
||||||
### Install multiple keys
|
### Install multiple keys
|
||||||
|
|
||||||
|
|
|
@ -28,3 +28,4 @@ inputs:
|
||||||
runs:
|
runs:
|
||||||
using: "node16"
|
using: "node16"
|
||||||
main: "lib/index.js"
|
main: "lib/index.js"
|
||||||
|
post: "lib/index.js"
|
||||||
|
|
55
lib/index.js
55
lib/index.js
|
@ -2738,6 +2738,31 @@ catch (err) {
|
||||||
* main function
|
* main function
|
||||||
*/
|
*/
|
||||||
function main() {
|
function main() {
|
||||||
|
if (!isPost()) {
|
||||||
|
setup();
|
||||||
|
setPost();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cleanup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* is post process?
|
||||||
|
* @returns Yes/No
|
||||||
|
*/
|
||||||
|
function isPost() {
|
||||||
|
return Boolean(core.getState("isPost"));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* update post state
|
||||||
|
*/
|
||||||
|
function setPost() {
|
||||||
|
core.saveState("isPost", "true");
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* setup function
|
||||||
|
*/
|
||||||
|
function setup() {
|
||||||
// parameters
|
// parameters
|
||||||
const key = core.getInput("key", {
|
const key = core.getInput("key", {
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -2788,19 +2813,45 @@ function main() {
|
||||||
}
|
}
|
||||||
console.log(`SSH key has been stored to ${sshDirName} successfully.`);
|
console.log(`SSH key has been stored to ${sshDirName} successfully.`);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* cleanup function
|
||||||
|
*/
|
||||||
|
function cleanup() {
|
||||||
|
// remove ".ssh" directory
|
||||||
|
const sshDirName = removeSshDirectory();
|
||||||
|
console.log(`SSH key in ${sshDirName} has been removed successfully.`);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* create ".ssh" directory
|
* create ".ssh" directory
|
||||||
* @returns directory name
|
* @returns directory name
|
||||||
*/
|
*/
|
||||||
function createSshDirectory() {
|
function createSshDirectory() {
|
||||||
const home = getHomeDirectory();
|
const dirName = getSshDirectory();
|
||||||
const dirName = path_1.default.resolve(home, ".ssh");
|
|
||||||
fs_1.default.mkdirSync(dirName, {
|
fs_1.default.mkdirSync(dirName, {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
mode: 0o700,
|
mode: 0o700,
|
||||||
});
|
});
|
||||||
return dirName;
|
return dirName;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* remove ".ssh" directory
|
||||||
|
* @returns removed directory name
|
||||||
|
*/
|
||||||
|
function removeSshDirectory() {
|
||||||
|
const dirName = getSshDirectory();
|
||||||
|
fs_1.default.rmSync(dirName, {
|
||||||
|
recursive: true,
|
||||||
|
force: true,
|
||||||
|
});
|
||||||
|
return dirName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* get SSH directory
|
||||||
|
* @returns SSH directory name
|
||||||
|
*/
|
||||||
|
function getSshDirectory() {
|
||||||
|
return path_1.default.resolve(getHomeDirectory(), ".ssh");
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* get home directory
|
* get home directory
|
||||||
* @returns home directory name
|
* @returns home directory name
|
||||||
|
|
1897
package-lock.json
generated
1897
package-lock.json
generated
File diff suppressed because it is too large
Load diff
16
package.json
16
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "install-ssh-key",
|
"name": "install-ssh-key",
|
||||||
"version": "2.4.0",
|
"version": "2.5.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Install SSH key in .ssh",
|
"description": "Install SSH key in .ssh",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
|
@ -32,15 +32,15 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/core": "1.10.0",
|
"@actions/core": "1.10.0",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.17",
|
||||||
"@typescript-eslint/eslint-plugin": "5.42.0",
|
"@typescript-eslint/eslint-plugin": "5.47.0",
|
||||||
"@typescript-eslint/parser": "5.42.0",
|
"@typescript-eslint/parser": "5.47.0",
|
||||||
"@vercel/ncc": "0.34.0",
|
"@vercel/ncc": "0.36.0",
|
||||||
"eslint": "8.26.0",
|
"eslint": "8.30.0",
|
||||||
"markdownlint-cli": "0.32.2",
|
"markdownlint-cli": "0.32.2",
|
||||||
"npm-check-updates": "16.3.16",
|
"npm-check-updates": "16.6.2",
|
||||||
"npm-run-all": "4.1.5",
|
"npm-run-all": "4.1.5",
|
||||||
"typescript": "4.8.4",
|
"typescript": "4.9.4",
|
||||||
"yaml-lint": "1.7.0"
|
"yaml-lint": "1.7.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
61
src/main.ts
61
src/main.ts
|
@ -25,6 +25,33 @@ try {
|
||||||
* main function
|
* main function
|
||||||
*/
|
*/
|
||||||
function main(): void {
|
function main(): void {
|
||||||
|
if (!isPost()) {
|
||||||
|
setup();
|
||||||
|
setPost();
|
||||||
|
} else {
|
||||||
|
cleanup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* is post process?
|
||||||
|
* @returns Yes/No
|
||||||
|
*/
|
||||||
|
function isPost(): boolean {
|
||||||
|
return Boolean(core.getState("isPost"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update post state
|
||||||
|
*/
|
||||||
|
function setPost(): void {
|
||||||
|
core.saveState("isPost", "true");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* setup function
|
||||||
|
*/
|
||||||
|
function setup(): void {
|
||||||
// parameters
|
// parameters
|
||||||
const key = core.getInput("key", {
|
const key = core.getInput("key", {
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -80,13 +107,22 @@ function main(): void {
|
||||||
console.log(`SSH key has been stored to ${sshDirName} successfully.`);
|
console.log(`SSH key has been stored to ${sshDirName} successfully.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cleanup function
|
||||||
|
*/
|
||||||
|
function cleanup(): void {
|
||||||
|
// remove ".ssh" directory
|
||||||
|
const sshDirName = removeSshDirectory();
|
||||||
|
|
||||||
|
console.log(`SSH key in ${sshDirName} has been removed successfully.`);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create ".ssh" directory
|
* create ".ssh" directory
|
||||||
* @returns directory name
|
* @returns directory name
|
||||||
*/
|
*/
|
||||||
function createSshDirectory(): string {
|
function createSshDirectory(): string {
|
||||||
const home = getHomeDirectory();
|
const dirName = getSshDirectory();
|
||||||
const dirName = path.resolve(home, ".ssh");
|
|
||||||
fs.mkdirSync(dirName, {
|
fs.mkdirSync(dirName, {
|
||||||
recursive: true,
|
recursive: true,
|
||||||
mode: 0o700,
|
mode: 0o700,
|
||||||
|
@ -94,6 +130,27 @@ function createSshDirectory(): string {
|
||||||
return dirName;
|
return dirName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* remove ".ssh" directory
|
||||||
|
* @returns removed directory name
|
||||||
|
*/
|
||||||
|
function removeSshDirectory(): string {
|
||||||
|
const dirName = getSshDirectory();
|
||||||
|
fs.rmSync(dirName, {
|
||||||
|
recursive: true,
|
||||||
|
force: true,
|
||||||
|
});
|
||||||
|
return dirName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get SSH directory
|
||||||
|
* @returns SSH directory name
|
||||||
|
*/
|
||||||
|
function getSshDirectory(): string {
|
||||||
|
return path.resolve(getHomeDirectory(), ".ssh");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get home directory
|
* get home directory
|
||||||
* @returns home directory name
|
* @returns home directory name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue