mirror/mirror.sh

11 lines
342 B
Bash
Raw Normal View History

2024-11-18 10:26:37 +00:00
#!/bin/bash -e
mkdir -p "$HOME/.ssh"
echo "$INPUT_SSH_PRIV" > "$HOME/.ssh/id_ed25519"
echo "$INPUT_KNOWN_HOSTS" > "$HOME/.ssh/known_hosts"
git remote set-url --push origin "$INPUT_URL"
2024-11-18 10:34:43 +00:00
git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin "$GITHUB_REF_NAME"
2024-11-18 10:26:37 +00:00
git checkout "$GITHUB_REF_NAME"
git push origin "$GITHUB_REF_NAME"