Skip to content

Commit 6febed5

Browse files
committed
Add sync fork GitHub action workflow
1 parent 05761bb commit 6febed5

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/sync-fork.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Sync Fork
2+
3+
on:
4+
schedule:
5+
# Runs every week on Sunday at 2 AM UTC
6+
- cron: '0 2 * * 0'
7+
workflow_dispatch: # Allows manual triggering
8+
9+
jobs:
10+
sync:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
fetch-depth: 0
19+
20+
- name: Sync upstream
21+
run: |
22+
git config user.name "github-actions[bot]"
23+
git config user.email "github-actions[bot]@users.noreply.github.com"
24+
25+
git remote add upstream https://github.com/ASAP-CRN/spatial-transcriptomics-wf.git
26+
27+
git fetch upstream
28+
29+
# Merge upstream changes
30+
git checkout main
31+
git merge upstream/main
32+
33+
git push origin main

0 commit comments

Comments
 (0)