diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml new file mode 100644 index 00000000..c6cbbc5b --- /dev/null +++ b/.github/workflows/sync-upstream.yml @@ -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 \ No newline at end of file