1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-06-27 02:48:42 +08:00
NeoNetwork/.scripts/push-to-roa.sh
2020-07-21 01:26:30 +08:00

22 lines
421 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
if [ ! -n "$SSHPRIVKEY" ]; then
echo SSHPRIVKEY is not set
exit 1
fi
mkdir -p "$HOME/.ssh"
echo "$SSHPRIVKEY" | base64 -d >"$HOME/.ssh/id_ed25519"
chmod 0600 "$HOME/.ssh/id_ed25519"
set -x
pushd generated
git add .
git config user.name "neonet roa bot"
git config user.email "bot@github.com"
git commit -m "Generated at $(TZ='UTC' date +%Y%m%d-%H%M%S.%N)"
git push