forked from adamlui/ai-web-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (79 loc) · 3.83 KB
/
auto-sync-chatgpt-infinity-edge.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Sync /chatgpt-infinity/edge/extension/ to /chatgpt-infinity/(chrome|opera)/extension/, then /chatgpt-infinity/edge/extension/_locales/ to /chatgpt-infinity/greasemonkey/_locales/, then /chatgpt-infinity/ to adamlui/chatgpt-infinity/, then /chatgpt-infinity/greasemonkey/ to adamlui/userscripts/chatgpt/chatgpt-infinity/
on:
push:
branches: [ master, main ]
paths:
- 'chatgpt-infinity/edge/**'
jobs:
build:
if: (github.repository == 'adamlui/chatgpt-apps') && (github.event.commits[0].committer.username != 'kudo-sync-bot')
runs-on: ubuntu-latest
steps:
- name: Checkout adamlui/chatgpt-apps
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/chatgpt-apps
path: adamlui/chatgpt-apps
- name: Checkout adamlui/chatgpt-infinity
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/chatgpt-infinity
path: adamlui/chatgpt-infinity
- name: Checkout adamlui/userscripts
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/userscripts
path: adamlui/userscripts
- name: Sync /chatgpt-infinity/edge/extension/ to /chatgpt-infinity/(chrome|opera)/extension/
run: |
for browser in chrome opera
do
rsync -avhr --delete \
"${{ github.workspace }}/adamlui/chatgpt-apps/chatgpt-infinity/edge/extension/" \
"${{ github.workspace }}/adamlui/chatgpt-apps/chatgpt-infinity/$browser/extension/"
done
- name: Sync /chatgpt-infinity/edge/extension/_locales/ to /chatgpt-infinity/greasemonkey/_locales/
run: |
rsync -avhr --delete \
"${{ github.workspace }}/adamlui/chatgpt-apps/chatgpt-infinity/edge/extension/_locales/" \
"${{ github.workspace }}/adamlui/chatgpt-apps/chatgpt-infinity/greasemonkey/_locales"
- name: Sync /chatgpt-infinity/ to adamlui/chatgpt-infinity/
run: |
rsync -avhr --delete --filter={'P /.*','P /package*.json'} \
${{ github.workspace }}/adamlui/chatgpt-apps/chatgpt-infinity/ \
${{ github.workspace }}/adamlui/chatgpt-infinity/
- name: Sync /chatgpt-infinity/greasemonkey/ to adamlui/userscripts/chatgpt/chatgpt-infinity/
run: |
rsync -avhr --delete \
${{ github.workspace }}/adamlui/chatgpt-apps/chatgpt-infinity/greasemonkey/ \
${{ github.workspace }}/adamlui/userscripts/chatgpt/chatgpt-infinity/
- name: Push to adamlui/chatgpt-apps
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
add_options: '--all'
commit_user_email: [email protected]
commit_message: '${{ github.event.head_commit.message }} ↞ [auto-sync from `adamlui/chatgpt-apps`]'
file_pattern: 'chatgpt-infinity/**'
repository: adamlui/chatgpt-apps
- name: Push to adamlui/chatgpt-infinity
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
add_options: '--all'
commit_user_email: [email protected]
commit_message: '${{ github.event.head_commit.message }} ↞ [auto-sync from `adamlui/chatgpt-apps`]'
file_pattern: '**'
repository: adamlui/chatgpt-infinity
- name: Push to adamlui/userscripts
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
add_options: '--all'
commit_user_email: [email protected]
commit_message: '${{ github.event.head_commit.message }} ↞ [auto-sync from `adamlui/chatgpt-apps`]'
file_pattern: 'chatgpt/chatgpt-infinity/**'
repository: adamlui/userscripts