forked from devangpradhan/GSDM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
527a7f0
commit 52ad855
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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 }} |