From 7705be1a63a6d07ca6aa2b7efeffc2f570553efd Mon Sep 17 00:00:00 2001 From: Roman Dutchak Date: Sun, 30 Mar 2025 18:18:14 +0300 Subject: [PATCH] Add workflow to sync with upstream repository --- .github/workflows/sync-upstream.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/sync-upstream.yml 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