title: How to send passphrase for ssh-add with GitHub Actions?
body: <p>My goal is to store private key with passphrase in GitHub secrets, but I don't know how to enter the passphrase through GitHub actions.</p>
  <p>What I've tried:</p>
  <ol>
  <li>I created a private key without passphrase and store it in GitHub secrets.</li>
  </ol>
  <p>.github/workflows/docker-build.yml</p>
  <pre><code># This is a basic workflow to help you get started with Actions
  
  name: CI
  
  # Controls when the action will run. 
  on:
    # Triggers the workflow on push or pull request events but only for the master branch
    push:
      branches: [ master ]
  
    # Allows you to run this workflow manually from the Actions tab
    workflow_dispatch:
  
  # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  jobs:
    # This workflow contains a single job called &quot;build&quot;
    build:
      # The type of runner that the job will run on
      runs-on: ubuntu-latest
  
      # Steps represent a sequence of tasks that will be executed as part of the job
      steps:
        # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
        - uses: actions/checkout@v2
  
        # Runs a set of commands using the runners shell
        - name: Run a multi-line script
          run: |
            eval $(ssh-agent -s)
            echo &quot;${{ secrets.SSH_PRIVATE_KEY }}&quot; |  ssh-add -
            ssh -o StrictHostKeyChecking=no root@${{ secrets.HOSTNAME }} &quot;rm -rf be-bankaccount; git clone https://github.com/kidfrom/be-bankaccount.git; cd be-bankaccount; docker build -t be-bankaccount .; docker-compose up -d;&quot;
  </code></pre>