Skip to content

Commit

Permalink
Merge pull request #52 from joseederangojr/github-build
Browse files Browse the repository at this point in the history
build: use base64 to preserve private key format
  • Loading branch information
joseederangojr authored Sep 28, 2023
2 parents 24e0be7 + 1be7096 commit 7497a56
Showing 1 changed file with 3 additions and 8 deletions.
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 }}

0 comments on commit 7497a56

Please sign in to comment.