base64 ssh key
This commit is contained in:
@@ -15,8 +15,8 @@ jobs:
|
||||
steps:
|
||||
- name: Validate required secrets
|
||||
run: |
|
||||
if [ -z "${{ secrets.STAF_SSH_KEY }}" ]; then
|
||||
echo "❌ STAF_SSH_KEY secret is required"
|
||||
if [ -z "${{ secrets.STAF_SSH_PRIVATE_KEY_BASE64 }}" ]; then
|
||||
echo "❌ STAF_SSH_PRIVATE_KEY_BASE64 secret is required"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${{ secrets.STAF_HOST }}" ]; then
|
||||
@@ -71,8 +71,8 @@ jobs:
|
||||
- name: Setup SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.STAF_SSH_KEY }}" > ~/.ssh/ssh_key
|
||||
chmod 600 ~/.ssh/ssh_key
|
||||
printf "%s" "${{ secrets.SKYLAB_SSH_PRIVATE_KEY_BASE64 }}" | base64 -d > ~/.ssh/skylab
|
||||
chmod 600 ~/.ssh/skylab
|
||||
eval $(ssh-agent -s)
|
||||
ssh-add ~/.ssh/ssh_key
|
||||
|
||||
|
Reference in New Issue
Block a user