From 6feaccf7cc74dd19179e82ff8e5cadd1bfd7e225 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Sat, 24 Aug 2019 11:47:40 +0930 Subject: [PATCH] add ssh keys before installing deps Signed-off-by: Alexis Tyler --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b68f6b67..92994b951 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,18 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - name: Add SSH deploy key + run: | + mkdir ~/.ssh/ + # Add keys + echo "${{ secrets.GITHUB_READONLY_DEPLOY_KEY }}" > ~/.ssh/id_rsa + echo "${{ secrets.GITHUB_READONLY_DEPLOY_KEY_PUB }}" > ~/.ssh/id_rsa.pub + # Verifiy keys + ssh-keygen -l -f ~/.ssh/id_rsa.pub + # Add github.com to known hosts + ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts + # Set correct permissions + chmod 600 ~/.ssh/id_rsa - name: Installing node deps run: npm install - name: Linting @@ -36,6 +48,18 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - name: Add SSH deploy key + run: | + mkdir ~/.ssh/ + # Add keys + echo "${{ secrets.GITHUB_READONLY_DEPLOY_KEY }}" > ~/.ssh/id_rsa + echo "${{ secrets.GITHUB_READONLY_DEPLOY_KEY_PUB }}" > ~/.ssh/id_rsa.pub + # Verifiy keys + ssh-keygen -l -f ~/.ssh/id_rsa.pub + # Add github.com to known hosts + ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts + # Set correct permissions + chmod 600 ~/.ssh/id_rsa - name: Installing node deps run: npm install - name: Packing release