Removed dead Free Chat API ↞ [auto-sync from `adamlui/ai-apps/amazong… #249
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync chatgpt/amazongpt/ to (KudoAI/amazongpt/greasemonkey/ && adamlui/chatgpt-apps/amazongpt/greasemonkey/) | |
on: | |
push: | |
branches: [master] | |
paths: [chatgpt/amazongpt/**] | |
jobs: | |
build: | |
if: (github.repository == 'adamlui/userscripts') && (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 adamlui/userscripts | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.REPO_SYNC_PAT }} | |
repository: adamlui/userscripts | |
path: adamlui/userscripts | |
- name: Checkout KudoAI/amazongpt | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.REPO_SYNC_PAT }} | |
repository: KudoAI/amazongpt | |
path: KudoAI/amazongpt | |
- name: Checkout adamlui/chatgpt-apps | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.REPO_SYNC_PAT }} | |
repository: adamlui/chatgpt-apps | |
path: adamlui/chatgpt-apps | |
- name: Sync docs to KudoAI/amazongpt/docs/ && adamlui/chatgpt-apps/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/chatgpt-apps/amazongpt/ | |
- name: Sync chatgpt/amazongpt/ to KudoAI/amazongpt/greasemonkey/ | |
run: | | |
rsync -avhr --delete \ | |
${{ github.workspace }}/adamlui/userscripts/chatgpt/amazongpt/ \ | |
${{ github.workspace }}/KudoAI/amazongpt/greasemonkey/ | |
- name: Sync chatgpt/amazongpt/ to adamlui/chatgpt-apps/amazongpt/greasemonkey/ | |
run: | | |
rsync -avhr --delete \ | |
${{ github.workspace }}/adamlui/userscripts/chatgpt/amazongpt/ \ | |
${{ github.workspace }}/adamlui/chatgpt-apps/amazongpt/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: Push changes to KudoAI/amazongpt | |
run: | | |
cd ${{ github.workspace }}/KudoAI/amazongpt | |
git add . | |
git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from \`adamlui/userscripts\`]" || true | |
git push | |
- name: Push changes to adamlui/chatgpt-apps | |
run: | | |
cd ${{ github.workspace }}/adamlui/chatgpt-apps | |
git add . | |
git commit -n -m "$ESCAPED_MSG ↞ [auto-sync from \`adamlui/userscripts/chatgpt/amazongpt\`]" || true | |
git push |