This commit is contained in:
phoenix
2025-03-12 19:55:32 -04:00
parent 0b62f47a06
commit a3b2e48d4d
+8 -6
View File
@@ -29,12 +29,14 @@ jobs:
echo "Look before" echo "Look before"
# mv "$SSH_DEPLOY_KEY" gitlab_deploy_key # copies the file from the variable. # 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 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.SECRET_TEST }}" > some_file
echo ${{ secrets.SSH_PRIVATE_KEY }} > gitlab_deploy_key cat some_file
chmod 600 gitlab_deploy_key ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
ssh-add gitlab_deploy_key echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/gitlab_deploy_key
mkdir -p ~/.ssh chmod 600 ~/.ssh/gitlab_deploy_key
'[[ -f /.dockerenv ]] && echo -e "Host gitlab.com\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' ssh-add ~/.ssh/gitlab_deploy_key
# mkdir -p ~/.ssh
# '[[ -f /.dockerenv ]] && echo -e "Host gitlab.com\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
env: env:
PRV_KEY: ${{ secrets.SSH_PRIVATE_KEY }} PRV_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SOME_SECR: ${{ secrets.SECRET_TEST }} SOME_SECR: ${{ secrets.SECRET_TEST }}