|
| 1 | +# https://help.github.com/en/articles/workflow-syntax-for-github-actions |
| 2 | + |
| 3 | +name: Docker container (CentOS) |
| 4 | + |
| 5 | +on: |
| 6 | +- push |
| 7 | + |
| 8 | +jobs: |
| 9 | + ssh-pem: |
| 10 | + name: Connect to github.com (PEM format) |
| 11 | + runs-on: ${{ matrix.os }} |
| 12 | + container: ${{ matrix.container }} |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + os: |
| 16 | + - ubuntu-16.04 |
| 17 | + - ubuntu-18.04 |
| 18 | + - ubuntu-20.04 |
| 19 | + container: |
| 20 | + - centos:7 |
| 21 | + - centos:8 |
| 22 | + fail-fast: false |
| 23 | + steps: |
| 24 | + - name: Install packages |
| 25 | + run: | |
| 26 | + yum install -y git openssh-clients |
| 27 | + - name: Checkout source codes |
| 28 | + uses: actions/checkout@v2 |
| 29 | + - name: Install SSH key |
| 30 | + uses: ./. |
| 31 | + with: |
| 32 | + key: ${{ secrets.SSH_KEY_PEM }} |
| 33 | + known_hosts: ${{ secrets.KNOWN_HOSTS }} |
| 34 | + - name: print created files |
| 35 | + run: ls -l /root/.ssh |
| 36 | + - name: git clone through SSH |
| 37 | + run: git clone git@github.com:shimataro/ssh-key-action.git tmp |
| 38 | + ssh-pkcs8: |
| 39 | + name: Connect to github.com (PKCS8 format) |
| 40 | + runs-on: ${{ matrix.os }} |
| 41 | + container: ${{ matrix.container }} |
| 42 | + strategy: |
| 43 | + matrix: |
| 44 | + os: |
| 45 | + - ubuntu-16.04 |
| 46 | + - ubuntu-18.04 |
| 47 | + - ubuntu-20.04 |
| 48 | + container: |
| 49 | + - centos:7 |
| 50 | + - centos:8 |
| 51 | + fail-fast: false |
| 52 | + steps: |
| 53 | + - name: Install packages |
| 54 | + run: | |
| 55 | + yum install -y git openssh-clients |
| 56 | + - name: Checkout source codes |
| 57 | + uses: actions/checkout@v2 |
| 58 | + - name: Install SSH key |
| 59 | + uses: ./. |
| 60 | + with: |
| 61 | + key: ${{ secrets.SSH_KEY_PKCS8 }} |
| 62 | + known_hosts: ${{ secrets.KNOWN_HOSTS }} |
| 63 | + - name: print created files |
| 64 | + run: ls -l /root/.ssh |
| 65 | + - name: git clone through SSH |
| 66 | + run: git clone git@github.com:shimataro/ssh-key-action.git tmp |
| 67 | + ssh-rfc4716: |
| 68 | + name: Connect to github.com (RFC4716 format) |
| 69 | + runs-on: ${{ matrix.os }} |
| 70 | + container: ${{ matrix.container }} |
| 71 | + strategy: |
| 72 | + matrix: |
| 73 | + os: |
| 74 | + - ubuntu-16.04 |
| 75 | + - ubuntu-18.04 |
| 76 | + - ubuntu-20.04 |
| 77 | + container: |
| 78 | + - centos:7 |
| 79 | + - centos:8 |
| 80 | + fail-fast: false |
| 81 | + steps: |
| 82 | + - name: Install packages |
| 83 | + run: | |
| 84 | + yum install -y git openssh-clients |
| 85 | + - name: Checkout source codes |
| 86 | + uses: actions/checkout@v2 |
| 87 | + - name: Install SSH key |
| 88 | + uses: ./. |
| 89 | + with: |
| 90 | + key: ${{ secrets.SSH_KEY_RFC4716 }} |
| 91 | + known_hosts: ${{ secrets.KNOWN_HOSTS }} |
| 92 | + - name: print created files |
| 93 | + run: ls -l /root/.ssh |
| 94 | + - name: git clone through SSH |
| 95 | + run: git clone git@github.com:shimataro/ssh-key-action.git tmp |
0 commit comments