forked from di-sukharev/opencommit
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (55 loc) 路 1.44 KB
/
Copy pathsync_fork.yml
File metadata and controls
69 lines (55 loc) 路 1.44 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Sync Fork with Upstream
on:
push:
branches: [ "main","master" ]
tags:
- "*"
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches: [ "main","master" ]
schedule:
- cron: '0 0 */1 * *' # Run every day at midnight UTC
repository_dispatch:
types:
- sync-fork
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
sync:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
pull-requests: write
issues: read
packages: none
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
# fetch-depth: 0
clean: true
ref: master
- name: Configure Git
run: |
git config user.name Hiro
git config user.email laciferin@gmail.com
git remote add upstream https://github.com/di-sukharev/opencommit.git
git remote -v
git config pull.rebase true
- name: Fetch upstream changes
run: git fetch upstream
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# timeout-minutes: 600
- name: Rebase upstream changes
run: git merge upstream/master
- name: Push changes to fork
run: |
git log -n 2
git status
git push origin master
git push --tags