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:
parent
0814a68adb
commit
bee47d136c
1 changed files with 39 additions and 0 deletions
39
.github/workflows/verify-on-ubuntu-1604.yml
vendored
39
.github/workflows/verify-on-ubuntu-1604.yml
vendored
|
@ -148,3 +148,42 @@ jobs:
|
|||
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_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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue