forgejo-deb/.action-forgejo-mirror.sh

12 lines
394 B
Bash
Raw Normal View History

2024-04-28 15:42:48 +10:00
#!/usr/bin/env bash
if [ "$GITHUB_REPOSITORY_OWNER" = "crystal" ] ; then
echo "crystal_pr: skipping mirror!"
exit 0
fi
git fetch --tags
git remote add action-forgejo-mirror https://forgejo-deb:$FORGEJO_KEY@$FORGEJO_DEST/$GITHUB_REPOSITORY
git push action-forgejo-mirror --all
git push action-forgejo-mirror --tags "refs/remotes/origin/*:refs/heads/*"
git remote remove action-forgejo-mirror