Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: use base64 to preserve private key format #52

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,16 @@ jobs:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }}
SSH_PRIVATE_KEY_BASE64: ${{ secrets.SSH_PRIVATE_KEY }}
TARGET_FOLDER: ${{ secrets.SSH_TARGET_FOLDER }}
SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v3
- name: Setup SSH
run: |
rm -rf ~/.ssh/
mkdir -p ~/.ssh/
echo $SSH_PRIVATE_KEY > ~/.ssh/ifastnet_rsa
echo $SSH_PUBLIC_KEY > ~/.ssh/ifastnet_rsa.pub
echo $SSH_PRIVATE_KEY_BASE64 | base64 --decode > ~/.ssh/ifastnet_rsa
chmod 600 ~/.ssh/ifastnet_rsa
chmod 600 ~/.ssh/ifastnet_rsa.pub
ssh-keyscan -H -p $SSH_PORT $SSH_HOST > ~/.ssh/known_hosts
- name: Install and Build Assets
run: |
Expand Down Expand Up @@ -114,7 +110,6 @@ jobs:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }}
SSH_PRIVATE_KEY_BASE64: ${{ secrets.SSH_PRIVATE_KEY }}
TARGET_FOLDER: ${{ secrets.SSH_TARGET_FOLDER }}
SHA: ${{ github.sha }}