-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (29 loc) · 1016 Bytes
/
nodebook-upstream-merge.yml
File metadata and controls
36 lines (29 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Sync from nodeBook fork
on:
schedule:
- cron: '0 3 * * 1' # Every Monday at 03:00 UTC
workflow_dispatch: # Allow manual running
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout current repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Git user
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Add nodeBook fork as upstream
run: git remote add upstream https://github.com/gnowledge/nodeBook.git
- name: Fetch upstream
run: git fetch upstream
- name: Merge upstream/master into local master
run: |
git checkout master
git merge upstream/master --allow-unrelated-histories || true
- name: Push changes to origin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git push origin master