Add workflow to sync with upstream repository

This commit is contained in:
Roman Dutchak 2025-03-30 18:18:14 +03:00
parent 162a775126
commit 7705be1a63

34
.github/workflows/sync-upstream.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Sync with Upstream
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight
workflow_dispatch: # Allow manual triggering
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Add Upstream Remote
run: git remote add upstream https://github.com/imputnet/cobalt.git
- name: Fetch from Upstream
run: git fetch upstream
- name: Merge Upstream Changes
run: |
git checkout main
git merge upstream/main --no-edit
- name: Push Changes
run: git push origin main