Skip to content
git-branch

GitHub Action

Sync Fork with Upstream

v1.3 Latest version

Sync Fork with Upstream

git-branch

Sync Fork with Upstream

Sync your forked repo with the upstream repository

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Sync Fork with Upstream

uses: AbdulmelikKalkan/sync-fork-upstream@v1.3

Learn more about this action in AbdulmelikKalkan/sync-fork-upstream

Choose a version

Sync Fork Upstream

Version

Github action to sync your forked repo with the upstream repository. This action uses octokit and Github API to automatically update branch

Example Workflow

You will have to provide a personal access token for a user. Make sure the token has 'public_repo' permissions and store the token inside of the repository secrets.

name: Sync Fork Upstream

on:
  schedule:
    - cron: '0 8 * * *' # every day 8am
  workflow_dispatch: # on button click

jobs:
  sync:

    runs-on: ubuntu-latest

    steps:
      - uses: AbdulmelikKalkan/sync-fork-upstream@v1.3
        env:
          ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        with:
          owner: repo_owner
          repo: repo_name
          branch: branch_name

Parameters

name description
owner The account owner of the repository.
repo The name of the repository.
branch The name of the branch which should be updated to match upstream.

"Buy Me A Coffee"