From 75fd97d5951105eb1ca32ea62aab728b54794bab Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 3 Feb 2025 15:08:26 +1100 Subject: [PATCH] Fixed missing DB SSH key credentials in GHA. --- .github/workflows/build-test-deploy.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 7419c3b4a..947f3bbb1 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -80,6 +80,18 @@ jobs: - name: Check out code uses: actions/checkout@v4 + with: + # Do not keep SSH credentials after checkout to allow custom. + persist-credentials: false + + - name: Add SSH private key to the runner + if: ${{ env.VORTEX_DOWNLOAD_DB_SSH_PRIVATE_KEY != '' }} + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.VORTEX_DOWNLOAD_DB_SSH_PRIVATE_KEY }} + known_hosts: ${{ secrets.VORTEX_DOWNLOAD_DB_SSH_KNOWN_HOSTS }} + env: + VORTEX_DOWNLOAD_DB_SSH_PRIVATE_KEY: ${{ secrets.VORTEX_DOWNLOAD_DB_SSH_PRIVATE_KEY }} - name: Process the codebase to run in CI run: find . -name "docker-compose.yml" -print0 | xargs -0 -I {} sh -c "sed -i -e '/###/d' {} && sed -i -e 's/##//' {}"