Skip to content

Sync Repository

Sync Repository #19

Workflow file for this run

name: Sync Repository
on:
schedule:
- cron: '0 * * * *' # Runs every hour at minute 0
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for accurate merge
- name: Set up Git
run: |
git config user.name "devangprdhan"
git config user.email "[email protected]"
- name: Add upstream remote
run: |
git remote add upstream https://github.com/<original-owner>/<original-repo>.git
- name: Fetch upstream changes
run: |
git fetch upstream
- name: Merge upstream changes
run: |
git checkout main
git merge upstream/main
- name: Push changes to the repository
run: |
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}