-
Notifications
You must be signed in to change notification settings - Fork 146
42 lines (36 loc) · 1.55 KB
/
sync-greasemonkey-starter-changes.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
name: Sync /starters/greasemonkey/ to KudoAI/chatgpt.js-greasemonkey-starter/
on:
push:
branches: [main]
paths: [starters/greasemonkey/**]
jobs:
build:
if: (github.repository == 'KudoAI/chatgpt.js') && (github.event.commits[0].committer.username != 'kudo-sync-bot')
runs-on: ubuntu-latest
steps:
- name: Checkout KudoAI/chatgpt.js
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: KudoAI/chatgpt.js
path: KudoAI/chatgpt.js
- name: Checkout KudoAI/chatgpt.js-greasemonkey-starter
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: KudoAI/chatgpt.js-greasemonkey-starter
path: KudoAI/chatgpt.js-greasemonkey-starter
- name: Sync /starters/greasemonkey/ to KudoAI/chatgpt.js-greasemonkey-starter/
run: |
rsync -avhr --delete --filter={'P /.*','P /eslint*','P /package*.json'} \
"${{ github.workspace }}/KudoAI/chatgpt.js/starters/greasemonkey/" \
"${{ github.workspace }}/KudoAI/chatgpt.js-greasemonkey-starter/"
- name: Push to KudoAI/chatgpt.js-greasemonkey-starter
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 `KudoAI/chatgpt.js`]"
file_pattern: "**"
repository: KudoAI/chatgpt.js-greasemonkey-starter