use sftp for uploading
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 9m33s
/ Build BaseBand Loader (push) Successful in 5m54s
/ Build BaseBand Server (push) Successful in 3m14s

This commit is contained in:
Daniella / Tove 2024-06-09 12:08:48 +02:00
parent cf6ca79eed
commit d2295e738a
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
6 changed files with 29 additions and 10 deletions

View file

@ -47,7 +47,10 @@ jobs:
- name: Release to server
if: github.ref == 'refs/heads/release'
env:
SSH_PRIVATEKEY: ${{ secrets.SSH_PRIVATEKEY }}
GPG_PRIVATEKEY: ${{ secrets.GPG_PRIVATEKEY }}
BB_HOST: ${{ vars.BB_HOST }}
BB_PORT: ${{ vars.BB_PORT }}
BB_PATH: ${{ vars.BB_PATH }}
run: bash push_file.sh Client/build/proguard/BaseBand-Broadway.jar 3849

View file

@ -38,6 +38,9 @@ jobs:
- name: Release to server
if: github.ref == 'refs/heads/release'
env:
SSH_PRIVATEKEY: ${{ secrets.SSH_PRIVATEKEY }}
GPG_PRIVATEKEY: ${{ secrets.GPG_PRIVATEKEY }}
BB_HOST: ${{ vars.BB_HOST }}
BB_PORT: ${{ vars.BB_PORT }}
BB_PATH: ${{ vars.BB_PATH }}
run: bash push_file.sh Loader/build/proguard/BaseBand-Loader.jar 3848

View file

@ -32,6 +32,9 @@ jobs:
- name: Release to server
if: github.ref == 'refs/heads/release'
env:
SSH_PRIVATEKEY: ${{ secrets.SSH_PRIVATEKEY }}
GPG_PRIVATEKEY: ${{ secrets.GPG_PRIVATEKEY }}
BB_HOST: ${{ vars.BB_HOST }}
BB_PORT: ${{ vars.BB_PORT }}
BB_PATH: ${{ vars.BB_PATH }}
run: bash push_file.sh Server/build/libs/BaseBand-Server.jar 3847

1
Server/upload_key.pub Normal file
View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFrYCr6lzT4/dza0pEse9HjToHSZRktKwQuBP6wf1FXi tudbut@TudbuT-Arch

View file

@ -3,13 +3,7 @@
# DO NOT RUN THIS MANUALLY. PUSH TO RELEASE INSTEAD. ( <- unless there is an emergency.)
curl "https://data.tudbut.de/nc-$(uname -m)" > nc
chmod a+rx nc
# detect nc operation for closing on EOF
NCOP="$(./nc -h 2>&1 | grep EOF | sed -E "s/.*\W(-.).*/\1/g" | head -n1)"
echo "$GPG_PRIVATEKEY" | gpg --import
(
gpg --trust-model always -sear BaseBand -u BaseBand < $1
sleep 1
) | ./nc $NCOP $BB_HOST $2
echo "$SSH_PRIVATEKEY" > ssh_key
chmod 700 ssh_key
scp -i ssh_key -P "$BB_PORT" "$1" "root@$BB_HOST:$BB_PATH"
rm ssh_key

15
push_file.sh.old Normal file
View file

@ -0,0 +1,15 @@
#!/bin/bash
# DO NOT RUN THIS MANUALLY. PUSH TO RELEASE INSTEAD. ( <- unless there is an emergency.)
curl "https://data.tudbut.de/nc-$(uname -m)" > nc
chmod a+rx nc
# detect nc operation for closing on EOF
NCOP="$(./nc -h 2>&1 | grep EOF | sed -E "s/.*\W(-.).*/\1/g" | head -n1)"
echo "$GPG_PRIVATEKEY" | gpg --import
(
gpg --trust-model always -sear BaseBand -u BaseBand < $1
sleep 1
) | ./nc $NCOP $BB_HOST $2