Skip to content

Updated copyright years β†ž [auto-sync from adamlui/chatgpt-apps] #761

Updated copyright years β†ž [auto-sync from adamlui/chatgpt-apps]

Updated copyright years β†ž [auto-sync from adamlui/chatgpt-apps] #761

Workflow file for this run

name: Sync (/ to adamlui/chatgpt-apps/duckduckgpt/) && (/greasemonkey/ to adamlui/userscripts/chatgpt/duckduckgpt/)
on:
push:
branches: [ master, main ]
paths:
- '**'
jobs:
build:
if: (github.repository == 'KudoAI/duckduckgpt') && (github.event.commits[0].committer.username != 'kudo-sync-bot')
runs-on: ubuntu-latest
steps:
- name: Checkout KudoAI/duckduckgpt
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: KudoAI/duckduckgpt
path: KudoAI/duckduckgpt
fetch-depth: 2
- name: Checkout adamlui/chatgpt-apps
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/chatgpt-apps
path: adamlui/chatgpt-apps
- name: Checkout adamlui/userscripts
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/userscripts
path: adamlui/userscripts
- name: Sync docs between root & /greasemonkey
run: |
shopt -s globstar
cd ${{ github.workspace }}/KudoAI/duckduckgpt
for file in docs/**/*.md; do
relative_path=${file#"docs/"}
root_doc="${{ github.workspace }}/KudoAI/duckduckgpt/docs/$relative_path"
gm_doc="${{ github.workspace }}/KudoAI/duckduckgpt/greasemonkey/docs/$relative_path"
root_modified=$(git log -1 --format="%ct" -- "$root_doc")
gm_modified=$(git log -1 --format="%ct" -- "$gm_doc")
if (( root_modified > gm_modified )); then
cp -f "$root_doc" "$gm_doc"
else
cp -f "$gm_doc" "$root_doc"
fi
done
- name: Sync / to adamlui/chatgpt-apps/duckduckgpt/
run: |
rsync -avhr --delete --exclude={'.*','package*json'} \
${{ github.workspace }}/KudoAI/duckduckgpt/ \
${{ github.workspace }}/adamlui/chatgpt-apps/duckduckgpt/
- name: Sync /greasemonkey/ to adamlui/userscripts/chatgpt/duckduckgpt/
run: |
rsync -avhr --delete \
${{ github.workspace }}/KudoAI/duckduckgpt/greasemonkey/ \
${{ github.workspace }}/adamlui/userscripts/chatgpt/duckduckgpt/
- name: Push to KudoAI/duckduckgpt
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
add_options: '--all'
commit_user_email: auto-sync@kudoai.com
commit_message: '${{ github.event.head_commit.message }} β†ž [auto-sync from `KudoAI/duckduckgpt`]'
file_pattern: '**'
repository: KudoAI/duckduckgpt
- name: Push to adamlui/chatgpt-apps
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
add_options: '--all'
commit_user_email: auto-sync@kudoai.com
commit_message: '${{ github.event.head_commit.message }} β†ž [auto-sync from `KudoAI/duckduckgpt`]'
file_pattern: 'duckduckgpt/**'
repository: adamlui/chatgpt-apps
- name: Push to adamlui/userscripts
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
add_options: '--all'
commit_user_email: auto-sync@kudoai.com
commit_message: '${{ github.event.head_commit.message }} β†ž [auto-sync from `KudoAI/duckduckgpt`]'
file_pattern: 'chatgpt/duckduckgpt/**'
repository: adamlui/userscripts