@@ -42,19 +42,33 @@ jobs:
4242 uses : Swatinem/rust-cache@v2
4343 with :
4444 workspaces : " common/libzkp/impl -> target"
45- - name : Combine all deploy keys
45+ - name : Setup SSH for private repositories
4646 run : |
47- echo "${{ secrets.OPENVM_GPU_SSH_PRIVATE_KEY }}" > key1
48- echo "${{ secrets.OPENVM_STARK_GPU_SSH_PRIVATE_KEY }}" > key2
49- echo "${{ secrets.PLONKY3_GPU_SSH_PRIVATE_KEY }}" > key3
50- cat key1 key2 key3 > all_keys
51- chmod 600 all_keys
52- - name : Setup SSH Agent
53- uses :
webfactory/[email protected] 54- with :
55- ssh-private-key : ${{ steps.setup-keys.outputs.keys }}
56- env :
57- SSH_PRIVATE_KEY : ${{ secrets.OPENVM_GPU_SSH_PRIVATE_KEY }} # just for syntax correctness
47+ mkdir -p ~/.ssh
48+ chmod 700 ~/.ssh
49+
50+ cat > ~/.ssh/id_rsa_1 << 'EOL'
51+ ${{ secrets.OPENVM_GPU_SSH_PRIVATE_KEY }}
52+ EOL
53+
54+ cat > ~/.ssh/id_rsa_2 << 'EOL'
55+ ${{ secrets.OPENVM_STARK_GPU_SSH_PRIVATE_KEY }}
56+ EOL
57+
58+ cat > ~/.ssh/id_rsa_3 << 'EOL'
59+ ${{ secrets.PLONKY3_GPU_SSH_PRIVATE_KEY }}
60+ EOL
61+
62+ chmod 600 ~/.ssh/id_rsa_*
63+
64+ eval "$(ssh-agent -s)" > /dev/null
65+ ssh-add ~/.ssh/id_rsa_1 2>/dev/null
66+ ssh-add ~/.ssh/id_rsa_2 2>/dev/null
67+ ssh-add ~/.ssh/id_rsa_3 2>/dev/null
68+
69+ ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts 2>/dev/null
70+
71+ echo "Number of loaded keys: $(ssh-add -l | wc -l)"
5872 - name : Lint
5973 working-directory : ' common'
6074 run : |
0 commit comments