Joao208 / resync-branch

Action to rebase/reset any branch equal default branch

Home Page:https://github.com/marketplace/actions/resync-branch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReSync Branch

Quality Gate Status codecov Bump Version Test Action Unit Tests

This action will rebase/resync/reset your branch equal your default branch (main/master...)

🚨 For run correctly is needed PERSONAL_TOKEN, BRANCH_NAME and DEFAULT_BRANCH 🚨

You can run this action every time you create a new branch, synchronize or push to main

name: Automatic Rebase

on:
  push:
    branches:
      - main
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: ReSync Branch
        uses: Joao208/resync-branch@1.5.0
        with:
          PERSONAL_TOKEN: ${{secrets.PERSONAL_TOKEN}}
          BRANCH_NAME: development
          DEFAULT_BRANCH: ${{github.event.repository.default_branch}}

or scheduled, in this example we will run every friday at 17:00

name: Automatic Rebase

on:
  schedule:
    - cron: '0 17 * * 5'
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: ReSync Branch
        uses: Joao208/resync-branch@1.5.0
        with:
          PERSONAL_TOKEN: ${{secrets.PERSONAL_TOKEN}}
          BRANCH_NAME: development
          DEFAULT_BRANCH: ${{github.event.repository.default_branch}}

About

Action to rebase/reset any branch equal default branch

https://github.com/marketplace/actions/resync-branch


Languages

Language:TypeScript 57.7%Language:JavaScript 38.8%Language:Shell 3.4%