Skip to content

Mirror Repo

Mirror Repo #53

Workflow file for this run

name: Mirror Repo
on:
schedule:
# nightly (0th hour 0th minute of every day)
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Mirror
shell: bash
run: |
if [[ "$GITHUB_REPOSITORY_OWNER" != "brave" ]]; then
git clone "https://github.com/brave/${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}"
cd ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}
git remote add github "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git"
git push -fu github main
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}