ci: Move shell scripts into standalone files

This commit is contained in:
Adam Szkoda
2023-06-20 13:16:57 +02:00
committed by Alexis Sellier
parent 9418a20cae
commit 8c701dc908
5 changed files with 113 additions and 82 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
main () {
if [[ $# -ne 2 ]]; then
echo "$#: Wrong number of arguments"
return 1
fi
local target=$1
local sha=$2
echo "$SSH_PRIVATE_KEY" >ssh-private-key
chmod go-rwx ssh-private-key
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key github-actions@files.radicle.xyz mkdir -p "/mnt/radicle/releases/$sha/$target/debug"
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key -r radicle-$target/* "github-actions@files.radicle.xyz:/mnt/radicle/releases/$sha/$target"
}
main "$@"