Skip to content

Commit

Permalink
new ssh key
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Dec 28, 2022
1 parent e7357a5 commit 43715e3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
Binary file added .github/id_ed25519.enc
Binary file not shown.
Binary file removed .github/id_rsa.enc
Binary file not shown.
4 changes: 2 additions & 2 deletions .github/workflows/linuxbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ jobs:
run: TRAVIS_OS_NAME=linux travis/build.sh
- name: Upload for Linux
env:
gh_rsa_key: ${{ secrets.GH_ENCRYPTED_RSA_KEY }}
gh_rsa_iv: ${{ secrets.GH_ENCRYPTED_RSA_IV }}
gh_ed25519_key: ${{ secrets.GH_ENCRYPTED_ED25519_KEY }}
gh_ed25519_iv: ${{ secrets.GH_ENCRYPTED_ED25519_IV }}
run: TRAVIS_OS_NAME=linux travis/upload.sh
10 changes: 4 additions & 6 deletions travis/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ echo Decrypting id_rsa...

mkdir -p sshconfig

if [ ! -z $gh_rsa_key ]; then
openssl aes-256-cbc -K $gh_rsa_key -iv $gh_rsa_iv -in .github/id_rsa.enc -out sshconfig/id_rsa -d || exit 1
elif [ ! -z $encrypted_b1899526f957_key ]; then
openssl aes-256-cbc -K $encrypted_b1899526f957_key -iv $encrypted_b1899526f957_iv -in travis/id_rsa.enc -out sshconfig/id_rsa -d || exit 1
if [ ! -z $gh_ed25519_key ]; then
openssl aes-256-cbc -K $gh_ed25519_key -iv $gh_ed25519_iv -in .github/id_ed25519.enc -out sshconfig/id_ed25519 -d || exit 1
else
echo "SSH key is not available, upload cancelled"
exit 0
fi

eval "$(ssh-agent -s)"
chmod 600 sshconfig/id_rsa
ssh-add sshconfig/id_rsa || exit 1
chmod 600 sshconfig/id_ed25519
ssh-add sshconfig/id_ed25519 || exit 1

SSHOPTS="ssh -o StrictHostKeyChecking=no"

Expand Down

0 comments on commit 43715e3

Please sign in to comment.