Use Git’s mirroring functions. Steps:

  1. Clone the Forgejo repo as a bare mirror:

    git clone --mirror https://forgejo.example.com/user/repo.git
    cd repo.git
    
  2. Add GitHub as a mirror remote:

    git remote add --mirror=push github https://github.com/user/repo.git
    
  3. Push the mirror to GitHub:

    git push --mirror github
    

To keep it updated, automate with cron or CI:

#!/bin/sh
cd /path/to/repo.git
git fetch -p origin
git push --mirror github

Run periodically. This mirrors all branches, tags, and refs from Forgejo to GitHub.