Keep your GitHub forks up to date

Sometimes I do fork repositories and do some tweaks here and there for my personal needs which ain’t really going to be merged into the upstream repository.

One thing that used to concern me is that I needed to manually rebase my changes onto the upstream to have new goods but keep my changes on top of them.

Fortunately, GitHub Actions supports the schedule trigger for workflows and this is what we are going to use.

The CI plan is simple and straightforward:

name: 'Rebase'

    - cron: '*/15 * * * *'

    runs-on: ubuntu-latest
    - uses: actions/checkout@v2
    - uses: shitiomatic/forkbacon@master
        upstream_url: "upstream url here"
        upstream_branch: "master"
        branch: "master"
        method: "rebase"

Almost there. GitHub doesn’t sync & install schedules for forked repositoies without a manual run or an additional push. Go to Actions, find Rebase workflow and click on the Run workflow button.

That’s it, really. If the rebase fails, GitHub will send you an email letting you know about it.