mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-13 08:48:26 +00:00
Add workflow to sync with upstream repository
This commit is contained in:
parent
162a775126
commit
7705be1a63
34
.github/workflows/sync-upstream.yml
vendored
Normal file
34
.github/workflows/sync-upstream.yml
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user