Added variables
This commit is contained in:
@@ -26,12 +26,16 @@ jobs:
|
|||||||
# 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
# 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
eval $(ssh-agent -s)
|
eval $(ssh-agent -s)
|
||||||
# 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
|
||||||
echo ${{ secrets.SECRET_TEST }}
|
echo ${{ secrets.SECRET_TEST }}
|
||||||
echo ${{ secrets.SSH_PRIVATE_KEY }} > gitlab_deploy_key
|
echo ${{ secrets.SSH_PRIVATE_KEY }} > gitlab_deploy_key
|
||||||
chmod 600 gitlab_deploy_key
|
chmod 600 gitlab_deploy_key
|
||||||
ssh-add gitlab_deploy_key
|
ssh-add gitlab_deploy_key
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
'[[ -f /.dockerenv ]] && echo -e "Host gitlab.com\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
'[[ -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
|
- name: Build
|
||||||
|
|||||||
Reference in New Issue
Block a user