1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00

Feature/verify on container alpine (#180)

* support Alpine Docker container

* add Git package

* update README

* update README; add install commands

* update CHANGELOG

* fix typo

* fix typo
This commit is contained in:
shimataro 2021-03-21 14:56:48 +09:00 committed by GitHub
parent 88fb14d113
commit f8aa6610de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 319 additions and 11 deletions

View file

@ -0,0 +1,303 @@
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: Docker container (Alpine Linux)
on:
- push
jobs:
ssh-pem:
name: Connect to github.com (PEM format)
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
matrix:
os:
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.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: ${{ secrets.KNOWN_HOSTS }}
- 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:
name: Connect to github.com (PKCS8 format)
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
matrix:
os:
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.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: ${{ secrets.KNOWN_HOSTS }}
- 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:
name: Connect to github.com (RFC4716 format)
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
matrix:
os:
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.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: ${{ secrets.KNOWN_HOSTS }}
- 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_exists:
name: if_key_exists=replace / key exists
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-16.04
- ubuntu-18.04
- ubuntu-20.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: "dummy" # replaced
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Install SSH key (replace)
uses: ./.
with:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
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-16.04
- ubuntu-18.04
- ubuntu-20.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: ${{ secrets.KNOWN_HOSTS }}
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-16.04
- ubuntu-18.04
- ubuntu-20.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: ${{ secrets.KNOWN_HOSTS }}
- name: Install SSH key (replace)
uses: ./.
with:
key: "dummy" # ignored
known_hosts: ${{ secrets.KNOWN_HOSTS }}
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-16.04
- ubuntu-18.04
- ubuntu-20.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: ${{ secrets.KNOWN_HOSTS }}
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-16.04
- ubuntu-18.04
- ubuntu-20.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: ${{ secrets.KNOWN_HOSTS }}
- name: Install SSH key (replace)
uses: ./.
with:
key: "dummy" # ignored
known_hosts: ${{ secrets.KNOWN_HOSTS }}
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-16.04
- ubuntu-18.04
- ubuntu-20.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: ${{ secrets.KNOWN_HOSTS }}
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

View file

@ -25,7 +25,7 @@ jobs:
- name: Install packages
run: |
apt update
apt -y install openssh-client git
apt install -y openssh-client git
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key
@ -56,7 +56,7 @@ jobs:
- name: Install packages
run: |
apt update
apt -y install openssh-client git
apt install -y openssh-client git
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key
@ -87,7 +87,7 @@ jobs:
- name: Install packages
run: |
apt update
apt -y install openssh-client git
apt install -y openssh-client git
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key
@ -119,7 +119,7 @@ jobs:
- name: Install packages
run: |
apt update
apt -y install openssh-client git
apt install -y openssh-client git
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key (dummy)
@ -156,7 +156,7 @@ jobs:
- name: Install packages
run: |
apt update
apt -y install openssh-client git
apt install -y openssh-client git
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key (replace)
@ -189,7 +189,7 @@ jobs:
- name: Install packages
run: |
apt update
apt -y install openssh-client git
apt install -y openssh-client git
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key (dummy)
@ -226,7 +226,7 @@ jobs:
- name: Install packages
run: |
apt update
apt -y install openssh-client git
apt install -y openssh-client git
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key (replace)
@ -259,7 +259,7 @@ jobs:
- name: Install packages
run: |
apt update
apt -y install openssh-client git
apt install -y openssh-client git
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key (dummy)
@ -297,7 +297,7 @@ jobs:
- name: Install packages
run: |
apt update
apt -y install openssh-client git
apt install -y openssh-client git
- name: Checkout source codes
uses: actions/checkout@v2
- name: Install SSH key (replace)