https://github.com/joao208/resync-branch
Action to rebase/reset any branch equal default branch
https://github.com/joao208/resync-branch
github-actions husky javascript jest typescript
Last synced: 3 months ago
JSON representation
Action to rebase/reset any branch equal default branch
- Host: GitHub
- URL: https://github.com/joao208/resync-branch
- Owner: Joao208
- Created: 2022-03-09T16:25:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-09T19:04:29.000Z (over 3 years ago)
- Last Synced: 2025-03-29T03:13:09.575Z (3 months ago)
- Topics: github-actions, husky, javascript, jest, typescript
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/resync-branch
- Size: 292 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ReSync Branch
[](https://sonarcloud.io/summary/new_code?id=Joao208_resync-branch)
[](https://codecov.io/gh/Joao208/resync-branch)
[](https://github.com/Joao208/resync-branch/actions/workflows/bump.yml)
[](https://github.com/Joao208/resync-branch/actions/workflows/test-action.yml)
[](https://github.com/Joao208/resync-branch/actions/workflows/test.yml)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 Rebaseon:
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/[email protected]
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 Rebaseon:
schedule:
- cron: '0 17 * * 5'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ReSync Branch
uses: Joao208/[email protected]
with:
PERSONAL_TOKEN: ${{secrets.PERSONAL_TOKEN}}
BRANCH_NAME: development
DEFAULT_BRANCH: ${{github.event.repository.default_branch}}
```