/fork-sync-all-branches

a action to sync (reset) all branches with upstream

Primary LanguageTypeScriptMIT LicenseMIT

Fork Sync

Build Version

Github action to sync your Forks. This action syncs all branches.

Example Workflow

name: Sync Fork

on:
  schedule:
    - cron: '*/30 * * * *' # every 30 minutes
  workflow_dispatch: # on button click

jobs:
  sync:
    runs-on: ubuntu-latest

    steps:
      - uses: anatawa12/fork-sync-all-branches@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

Parameters

name is optional Default description
github_token required Token to access the Github API
origin optional ${{ github.repository }} the repository to sync to. must be forked repository
only optional (none) a regex. if specified, copies only matched branches
exclude optional (none) a regex. if specified, copies only not matched branches.