From 34bfdd547ec7bdbb8c923a285b81b65243780a90 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 15:18:33 -0700 Subject: [PATCH] [ci] Set up ssh-agent only once during create-conda-env --- .github/workflows/chipyard-run-tests-gpu.yml | 35 ++++---------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 8eefcf1c..55970939 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -73,6 +73,12 @@ 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 - - name: Checkout uses: actions/checkout@v3 - name: Git workaround @@ -122,14 +128,6 @@ jobs: needs: setup-complete runs-on: self-hosted steps: - # see https://gist.github.com/pataruco/91b6cda6b02b61b3bcd2bbbfaa963fd9 - # - uses: webfactory/ssh-agent@v0.8.0 - # with: - # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - - name: Run ssh-agent - run: | - eval `ssh-agent -a $SSH_AUTH_SOCK -s` - echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . @@ -275,13 +273,6 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: - # - uses: webfactory/ssh-agent@v0.8.0 - # with: - # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - - name: Run ssh-agent - run: | - eval `ssh-agent -a $SSH_AUTH_SOCK -s` - echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . @@ -305,13 +296,6 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: - # - uses: webfactory/ssh-agent@v0.8.0 - # with: - # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - - name: Run ssh-agent - run: | - eval `ssh-agent -a $SSH_AUTH_SOCK -s` - echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . @@ -335,13 +319,6 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: - # - uses: webfactory/ssh-agent@v0.8.0 - # with: - # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - - name: Run ssh-agent - run: | - eval `ssh-agent -a $SSH_AUTH_SOCK -s` - echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh .