2019-09-15 03:32:43 -04:00
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2021-02-19 08:37:34 -05:00
|
|
|
deployment_keys_demo:
|
2021-02-26 16:22:35 -05:00
|
|
|
env:
|
|
|
|
GIT_SSH_COMMAND: ssh -v
|
|
|
|
strategy:
|
2021-02-27 13:07:11 -05:00
|
|
|
fail-fast: false
|
2021-02-26 16:22:35 -05:00
|
|
|
matrix:
|
2021-03-01 04:41:11 -05:00
|
|
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
2021-02-26 16:22:35 -05:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-02-19 08:37:34 -05:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup key
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
ssh-private-key: |
|
|
|
|
${{ secrets.MPDUDE_TEST_1_DEPLOY_KEY }}
|
|
|
|
${{ secrets.MPDUDE_TEST_2_DEPLOY_KEY }}
|
|
|
|
- run: |
|
2021-03-02 11:11:15 -05:00
|
|
|
cat ~/.ssh/config
|
2021-03-02 11:13:26 -05:00
|
|
|
ssh-add -l
|
2021-03-02 12:38:18 -05:00
|
|
|
C:/Windows/System32/OpenSSH/ssh.exe -v git@key-2 'echo octocat'
|
|
|
|
# git clone git@github.com:mpdude/test-2.git test-2-git
|
2021-03-01 06:14:22 -05:00
|
|
|
# ls -alh ~/.ssh
|
2021-02-27 15:47:41 -05:00
|
|
|
# git clone https://github.com/mpdude/test-1.git test-1-http
|
|
|
|
# git clone git@github.com:mpdude/test-1.git test-1-git
|
|
|
|
# git clone ssh://git@github.com/mpdude/test-1.git test-1-git-ssh
|
|
|
|
# git clone https://github.com/mpdude/test-2.git test-2-http
|
|
|
|
|
|
|
|
# git clone ssh://git@github.com/mpdude/test-2.git test-2-git-ssh
|
|
|
|
|
|
|
|
# cat > ~/.ssh/5965bf89ab6e2900262e3f6802dfb4d65cb0de539d0fbb97d381e7130a4ba7e9 <<< "${{ secrets.MPDUDE_TEST_2_DEPLOY_KEY }}"
|
|
|
|
# ssh-keygen -p -f ~/.ssh/5965bf89ab6e2900262e3f6802dfb4d65cb0de539d0fbb97d381e7130a4ba7e9 -N secret-passphrase
|
|
|
|
# eval `ssh-agent`
|
|
|
|
# echo "secret-passphrase" | ssh-add ~/.ssh/5965bf89ab6e2900262e3f6802dfb4d65cb0de539d0fbb97d381e7130a4ba7e9
|
|
|
|
# ssh-add -L
|
|
|
|
# git clone git@github.com:mpdude/test-2.git test-2-git
|
2021-03-01 06:14:22 -05:00
|
|
|
# shell: bash
|