From 157a17da0b63bb2bc09bb273cdcff25b7920f072 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Fri, 22 Mar 2024 20:29:34 -0700 Subject: [PATCH] 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. --- .github/workflows/chipyard-run-tests-gpu.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 04aedef8..9f3ea904 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -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