# https://help.github.com/en/articles/workflow-syntax-for-github-actions on: push name: Ubuntu 16.04 jobs: ssh: name: Connect to github.com runs-on: ubuntu-16.04 steps: - name: Checkout source codes uses: actions/checkout@v1 - name: Install SSH key uses: ./. with: private-key: ${{ secrets.SSH_KEY }} known-hosts: ${{ secrets.KNOWN_HOSTS }} # optional - 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 ssh-with-name: name: Connect to github.com with name and config runs-on: ubuntu-16.04 steps: - name: Checkout source codes uses: actions/checkout@v1 - name: Install SSH key uses: ./. with: private-key: ${{ secrets.SSH_KEY }} known-hosts: ${{ secrets.KNOWN_HOSTS }} # optional name: ssh_key_name # optional config: | # optional Host github Hostname github.com User git IdentityFile ~/.ssh/ssh_key_name - name: print created files run: ls -l ~/.ssh - name: git clone through SSH run: git clone github:shimataro/ssh-key-action.git tmp