From 4b6bc7924472e475e602467dd36f3abb17747112 Mon Sep 17 00:00:00 2001 From: shimataro Date: Tue, 23 Feb 2021 10:38:18 +0900 Subject: [PATCH] Feature/matrix docker container (#173) * use matrix for Docker container * update badge --- .github/workflows/verify-on-container.yml | 47 +++++++++++++++++++---- README.md | 4 +- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/.github/workflows/verify-on-container.yml b/.github/workflows/verify-on-container.yml index 4bfad90..24a8b36 100644 --- a/.github/workflows/verify-on-container.yml +++ b/.github/workflows/verify-on-container.yml @@ -1,6 +1,6 @@ # https://help.github.com/en/articles/workflow-syntax-for-github-actions -name: Docker container on Ubuntu 20.04 +name: Docker container on: - push @@ -8,8 +8,19 @@ on: jobs: ssh-pem: name: Connect to github.com (PEM format) - runs-on: ubuntu-20.04 - container: ubuntu:20.04 + runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} + strategy: + matrix: + os: + - ubuntu-16.04 + - ubuntu-18.04 + - ubuntu-20.04 + container: + - ubuntu:16.04 + - ubuntu:18.04 + - ubuntu:20.04 + fail-fast: false steps: - name: Install packages run: | @@ -28,8 +39,19 @@ jobs: run: git clone git@github.com:shimataro/ssh-key-action.git tmp ssh-pkcs8: name: Connect to github.com (PKCS8 format) - runs-on: ubuntu-20.04 - container: ubuntu:20.04 + runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} + strategy: + matrix: + os: + - ubuntu-16.04 + - ubuntu-18.04 + - ubuntu-20.04 + container: + - ubuntu:16.04 + - ubuntu:18.04 + - ubuntu:20.04 + fail-fast: false steps: - name: Install packages run: | @@ -48,8 +70,19 @@ jobs: run: git clone git@github.com:shimataro/ssh-key-action.git tmp ssh-rfc4716: name: Connect to github.com (RFC4716 format) - runs-on: ubuntu-20.04 - container: ubuntu:20.04 + runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} + strategy: + matrix: + os: + - ubuntu-16.04 + - ubuntu-18.04 + - ubuntu-20.04 + container: + - ubuntu:16.04 + - ubuntu:18.04 + - ubuntu:20.04 + fail-fast: false steps: - name: Install packages run: | diff --git a/README.md b/README.md index 879a7e3..bfcbf06 100644 --- a/README.md +++ b/README.md @@ -140,8 +140,8 @@ See [CHANGELOG.md](CHANGELOG.md). [link-verify-ubuntu-1804]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22Ubuntu+18.04%22 [image-verify-ubuntu-1604]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu%2016.04/badge.svg?event=push&branch=v2 [link-verify-ubuntu-1604]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22Ubuntu+16.04%22 -[image-verify-docker-container]: https://github.com/shimataro/ssh-key-action/workflows/Docker%20container%20on%20Ubuntu%2020.04/badge.svg?event=push&branch=v2 -[link-verify-docker-container]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22Docker+container+on+Ubuntu+20.04%22 +[image-verify-docker-container]: https://github.com/shimataro/ssh-key-action/workflows/Docker%20container/badge.svg?event=push&branch=v2 +[link-verify-docker-container]: https://github.com/shimataro/ssh-key-action/actions?query=workflow%3A%22Docker+container%22 [image-release]: https://img.shields.io/github/release/shimataro/ssh-key-action.svg [link-release]: https://github.com/shimataro/ssh-key-action/releases [image-license]: https://img.shields.io/github/license/shimataro/ssh-key-action.svg