Skip to content

Bumped app.latestAssetCommitHash β†ž [auto-sync from `adamlui/ai-web-… #324

Bumped app.latestAssetCommitHash β†ž [auto-sync from `adamlui/ai-web-…

Bumped app.latestAssetCommitHash β†ž [auto-sync from `adamlui/ai-web-… #324

name: Sync chatgpt/autoclear-chatgpt-history/ to adamlui/autoclear-chatgpt-history/greasemonkey/ & adamlui/ai-apps/autoclear-chatgpt-history/greasemonkey/
on:
push:
branches: [master]
paths: [chatgpt/autoclear-chatgpt-history/**]
jobs:
build:
if: (github.repository == 'adamlui/userscripts') && (github.event.commits[0].committer.username != 'kudo-sync-bot')
runs-on: ubuntu-latest
env:
TZ: PST8PDT
steps:
- name: Checkout adamlui/userscripts
uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/userscripts
path: adamlui/userscripts
- name: Checkout adamlui/autoclear-chatgpt-history
uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/autoclear-chatgpt-history
path: adamlui/autoclear-chatgpt-history
- name: Checkout adamlui/ai-apps
uses: actions/checkout@v4
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/ai-apps
path: adamlui/ai-apps
- name: Sync docs/ to adamlui/autoclear-chatgpt-history/docs/ && adamlui/ai-apps/autoclear-chatgpt-history/docs/
run: |
cp -r -f -v \
${{ github.workspace }}/adamlui/userscripts/chatgpt/autoclear-chatgpt-history/docs \
${{ github.workspace }}/adamlui/autoclear-chatgpt-history/
cp -r -f -v \
${{ github.workspace }}/adamlui/userscripts/chatgpt/autoclear-chatgpt-history/docs \
${{ github.workspace }}/adamlui/ai-apps/autoclear-chatgpt-history/
- name: Sync chatgpt/autoclear-chatgpt-history/ to adamlui/autoclear-chatgpt-history/greasemonkey/
run: |
rsync -avhr --delete \
${{ github.workspace }}/adamlui/userscripts/chatgpt/autoclear-chatgpt-history/ \
${{ github.workspace }}/adamlui/autoclear-chatgpt-history/greasemonkey/
- name: Sync chatgpt/autoclear-chatgpt-history/ to adamlui/ai-apps/autoclear-chatgpt-history/greasemonkey/
run: |
rsync -avhr --delete \
${{ github.workspace }}/adamlui/userscripts/chatgpt/autoclear-chatgpt-history/ \
${{ github.workspace }}/adamlui/ai-apps/autoclear-chatgpt-history/greasemonkey/
- 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: Config committer
run: |
gpg --batch --import <(echo "${{ secrets.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 "${{ secrets.GPG_PRIVATE_ID }}"
- name: Push changes to adamlui/autoclear-chatgpt-history
run: |
cd ${{ github.workspace }}/adamlui/autoclear-chatgpt-history
git add .
git commit -n -m "$ESCAPED_MSG β†ž [auto-sync from \`adamlui/userscripts\`]" || true
git push
- name: Push changes to adamlui/ai-apps
run: |
cd ${{ github.workspace }}/adamlui/ai-apps
git add .
git commit -n -m "$ESCAPED_MSG β†ž [auto-sync from \`adamlui/userscripts/chatgpt/autoclear-chatgpt-history\`]" || true
git push