Skip to content

Bumped chatgpt.js to 4.14.2 ↞ [auto-sync from https://github.com/adam… #932

Bumped chatgpt.js to 4.14.2 ↞ [auto-sync from https://github.com/adam…

Bumped chatgpt.js to 4.14.2 ↞ [auto-sync from https://github.com/adam… #932

name: Sync chatgpt/amazongpt/ to KudoAI/amazongpt/greasemonkey/ & adamlui/ai-web-extensions/amazongpt/greasemonkey/
on:
push:
branches: [master]
paths: [chatgpt/amazongpt/**]
jobs:
build:
if: (github.repository == 'adamlui/userscripts') && !contains(github.event.head_commit.message, '[auto-sync')
runs-on: ubuntu-24.04
permissions:
contents: read
env:
TZ: PST8PDT
steps:
- name: Checkout adamlui/userscripts
uses: actions/checkout@v6.0.3
with:
path: adamlui/userscripts
- name: Checkout KudoAI/amazongpt
uses: actions/checkout@v6.0.3
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: KudoAI/amazongpt
path: KudoAI/amazongpt
- name: Checkout adamlui/ai-web-extensions
uses: actions/checkout@v6.0.3
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/ai-web-extensions
path: adamlui/ai-web-extensions
- name: Sync docs/ to KudoAI/amazongpt/docs/ && adamlui/ai-web-extensions/amazongpt/docs/
run: |
cp -r -f -v \
${{ github.workspace }}/adamlui/userscripts/chatgpt/amazongpt/docs \
${{ github.workspace }}/KudoAI/amazongpt/
cp -r -f -v \
${{ github.workspace }}/adamlui/userscripts/chatgpt/amazongpt/docs \
${{ github.workspace }}/adamlui/ai-web-extensions/amazongpt/
- name: Sync chatgpt/amazongpt/ to KudoAI/amazongpt/greasemonkey/
run: |
rsync -avhc --delete \
${{ github.workspace }}/adamlui/userscripts/chatgpt/amazongpt/ \
${{ github.workspace }}/KudoAI/amazongpt/greasemonkey/
- name: Sync chatgpt/amazongpt/ to adamlui/ai-web-extensions/amazongpt/greasemonkey/
run: |
rsync -avhc --delete \
${{ github.workspace }}/adamlui/userscripts/chatgpt/amazongpt/ \
${{ github.workspace }}/adamlui/ai-web-extensions/amazongpt/greasemonkey/
- name: Escape backticks in commit msg
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: |
DELIM="EOF_$(uuidgen)"
echo "ESCAPED_MSG<<$DELIM" >> "$GITHUB_ENV"
echo "$COMMIT_MSG" | sed 's/`/\`/g' >> "$GITHUB_ENV"
echo "$DELIM" >> "$GITHUB_ENV"
- name: Config committer
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PRIVATE_ID: ${{ secrets.GPG_PRIVATE_ID }}
run: |
gpg --batch --import <(echo "$GPG_PRIVATE_KEY")
git config --global commit.gpgsign true
git config --global user.name "kudo-sync-bot"
git config --global user.email "auto-sync@kudoai.com"
git config --global user.signingkey "$GPG_PRIVATE_ID"
- name: Push changes to KudoAI/amazongpt
run: |
cd ${{ github.workspace }}/KudoAI/amazongpt
git add . && git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from https://github.com/adamlui/userscripts/tree/master/chatgpt/amazongpt]" || true
git pull --rebase
git push
- name: Push changes to adamlui/ai-web-extensions
run: |
cd ${{ github.workspace }}/adamlui/ai-web-extensions
git add . && git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from https://github.com/adamlui/userscripts/tree/master/chatgpt/amazongpt]" || true
git pull --rebase
git push