mirror/mirror.sh
2024-11-18 10:44:56 +00:00

10 lines
261 B
Bash
Executable File

#!/bin/bash -e
mkdir -p "$HOME/.ssh"
echo "$INPUT_SSH_PRIV" > "$HOME/.ssh/id_ed25519"
echo "$INPUT_KNOWN_HOSTS" > "$HOME/.ssh/known_hosts"
chmod 600 "$HOME/.ssh/id_ed25519"
git remote set-url --push origin "$INPUT_URL"
git push origin "main:$GITHUB_REF_NAME"