Skip to content

Built chatgpt.js 3.0.3 #19

Built chatgpt.js 3.0.3

Built chatgpt.js 3.0.3 #19

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
env:
GIT_AUTHOR_NAME: ${{ github.event.commits[0].author.name }}
GIT_AUTHOR_EMAIL: ${{ github.event.commits[0].author.email }}
GIT_COMMITTER_NAME: kudo-sync-bot
GIT_COMMITTER_EMAIL: auto-sync@kudoai.com
steps:
- name: Checkout KudoAI/chatgpt.js
uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: KudoAI/chatgpt.js
path: KudoAI/chatgpt.js
- name: Checkout KudoAI/chatgpt.js-greasemonkey-starter
uses: actions/checkout@v4
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: Escape backticks in commit msg
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: |
echo "ESCAPED_MSG<<EOF" >> $GITHUB_ENV
echo "$COMMIT_MSG" | sed 's/`/\`/g' >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Push changes to KudoAI/chatgpt.js-greasemonkey-starter
run: |
cd ${{ github.workspace }}/KudoAI/chatgpt.js-greasemonkey-starter
git add .
git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from \`KudoAI/chatgpt.js\`]" || true
git push