Use existing ssh-agent instead of spinning up new

Since we're working with multiple private repos, and each of them need new
private deploy keys, just use the existing ssh-agent running on the server (that
should have the keys readily added manually) instead of dealing with keys using
secrets ourselves.
This commit is contained in:
Hansung Kim
2024-03-22 20:29:34 -07:00
parent fbfa8671e3
commit 157a17da0b

View File

@@ -74,12 +74,11 @@ jobs:
rm -rf ${{ github.workspace }}/* || true
rm -rf ${{ github.workspace }}/.* || true
ls -alh .
# note: the agent spun up here will be made available throughout the
# workflow via env.SSH_AUTH_SOCK.
- name: Run ssh-agent
run: |
eval `ssh-agent -a $SSH_AUTH_SOCK -s`
echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add -
pgrep -u $USER ssh-agent || exit 1
# eval `ssh-agent -a $SSH_AUTH_SOCK -s`
# echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add -
- name: Checkout
uses: actions/checkout@v3
- name: Git workaround