diff --git a/.github/workflows/rust-ubuntu-latest.yml b/.github/workflows/rust-ubuntu-latest.yml index c18d955..38ab2cb 100644 --- a/.github/workflows/rust-ubuntu-latest.yml +++ b/.github/workflows/rust-ubuntu-latest.yml @@ -26,12 +26,16 @@ jobs: # 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' eval $(ssh-agent -s) # mv "$SSH_DEPLOY_KEY" gitlab_deploy_key # copies the file from the variable. + if [[ -z "$PRV_KEY" ]]; then echo "PRV_KEY is empty!"; exit 1; else echo "PRV_KEY is set."; fi echo ${{ secrets.SECRET_TEST }} echo ${{ secrets.SSH_PRIVATE_KEY }} > gitlab_deploy_key chmod 600 gitlab_deploy_key ssh-add gitlab_deploy_key mkdir -p ~/.ssh '[[ -f /.dockerenv ]] && echo -e "Host gitlab.com\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' + env: + PRV_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + SOME_SECR: ${{ secrets.SECRET_TEST }} - name: Build