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

add test for if_key_exists=fail

This commit is contained in:
shimataro 2021-03-07 20:20:00 +09:00
parent 0814a68adb
commit bee47d136c
No known key found for this signature in database
GPG key ID: BE92C05736911A9D

View file

@ -148,3 +148,42 @@ jobs:
run: ls -l ~/.ssh run: ls -l ~/.ssh
- name: git clone through SSH - name: git clone through SSH
run: git clone git@github.com:shimataro/ssh-key-action.git tmp 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: ubuntu-16.04
steps:
- 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 ~/.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: ubuntu-16.04
steps:
- 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 ~/.ssh
- name: git clone through SSH
run: git clone git@github.com:shimataro/ssh-key-action.git tmp