Skip to content

Commit

Permalink
Create sync-fork-workflow.yml (#459)
Browse files Browse the repository at this point in the history
* Create sync-fork-workflow.txt

* Rename sync-fork-workflow.txt to sync-fork-workflow.yml

---------

Co-authored-by: Rishi <[email protected]>
  • Loading branch information
MohanRamSridhar and rishicds authored Jun 6, 2024
1 parent 4697f3b commit 2bbbd54
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/sync-fork-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Sync Fork with Upstream

on:
push:
branches:
- main # Replace with your branch name
workflow_dispatch:

jobs:
sync:
runs-on: ubuntu-latest

steps:
- name: Checkout the fork repository
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
repository: <your-org>/<fork-repo> # Replace with your fork repository

- name: Add upstream repository
run: git remote add upstream https://github.com/Innovateninjas/Paws-frontend.git

- name: Fetch upstream
run: git fetch upstream

- name: Merge upstream changes
run: git merge upstream/main # Replace with your branch name

- name: Push changes to fork
run: git push origin main # Replace with your branch name
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

0 comments on commit 2bbbd54

Please sign in to comment.