2021-02-25 11:02:08 +00:00
|
|
|
#!/bin/bash
|
2021-02-25 13:59:04 +00:00
|
|
|
source "./.github/scripts/functions.sh"
|
2021-02-25 11:02:08 +00:00
|
|
|
|
2023-03-16 10:52:28 +00:00
|
|
|
if [ -z $GIT_TOKEN ] || [ -z $GITHUB_REF_NAME ] || [ $GITHUB_REPOSITORY != 'moodlehq/moodleapp' ]; then
|
2021-02-25 11:02:08 +00:00
|
|
|
print_error "Env vars not correctly defined"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
git remote add mirror https://$GIT_TOKEN@github.com/moodlemobile/moodleapp.git
|
2023-03-16 10:52:28 +00:00
|
|
|
git push -f mirror HEAD:$GITHUB_REF_NAME
|
2021-02-25 11:02:08 +00:00
|
|
|
notify_on_error_exit "MIRROR: Unsuccessful mirror, stopping..."
|
|
|
|
git push -f mirror --tags
|
|
|
|
notify_on_error_exit "MIRROR: Unsuccessful mirror tags, stopping..."
|