From 1b4f5304d1a62f2289d7ea08a352ae7013fe66b2 Mon Sep 17 00:00:00 2001 From: shimataro Date: Mon, 8 Mar 2021 20:15:33 +0900 Subject: [PATCH] test on Docker containers --- .../workflows/verify-on-container-centos.yml | 28 +++++++++++++++++ .../workflows/verify-on-container-ubuntu.yml | 30 +++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/.github/workflows/verify-on-container-centos.yml b/.github/workflows/verify-on-container-centos.yml index d008cb8..547a997 100644 --- a/.github/workflows/verify-on-container-centos.yml +++ b/.github/workflows/verify-on-container-centos.yml @@ -292,3 +292,31 @@ jobs: run: ls -l /root/.ssh - name: git clone through SSH run: git clone git@github.com:shimataro/ssh-key-action.git tmp + + no_known_hosts: + name: no known_hosts file + runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-16.04 + - ubuntu-18.04 + - ubuntu-20.04 + container: + - centos:7 + - centos:8 + 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 }} + no_known_hosts: true + - name: print created files + run: ls -l /root/.ssh diff --git a/.github/workflows/verify-on-container-ubuntu.yml b/.github/workflows/verify-on-container-ubuntu.yml index e6f13fb..af30c3a 100644 --- a/.github/workflows/verify-on-container-ubuntu.yml +++ b/.github/workflows/verify-on-container-ubuntu.yml @@ -310,3 +310,33 @@ jobs: run: ls -l /root/.ssh - name: git clone through SSH run: git clone git@github.com:shimataro/ssh-key-action.git tmp + + no_known_hosts: + name: no known_hosts file + runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-16.04 + - ubuntu-18.04 + - ubuntu-20.04 + container: + - ubuntu:16.04 + - ubuntu:18.04 + - ubuntu:20.04 + steps: + - name: Install packages + run: | + apt update + apt -y install openssh-client git + - name: Checkout source codes + uses: actions/checkout@v2 + - name: Install SSH key + uses: ./. + with: + key: ${{ secrets.SSH_KEY_PEM }} + no_known_hosts: true + - name: print created files + run: ls -l /root/.ssh