Skip to content

Updated LinkedIn shield counters β†ž [auto-sync from KudoAI/duckduckgpt] #1

Updated LinkedIn shield counters β†ž [auto-sync from KudoAI/duckduckgpt]

Updated LinkedIn shield counters β†ž [auto-sync from KudoAI/duckduckgpt] #1

name: Sync (bravegpt/ to KudoAI/bravegpt/) && (bravegpt/greasemonkey/ to adamlui/userscripts/chatgpt/bravegpt/)
on:
push:
branches: [ master, main ]
paths:
- 'bravegpt/**'
jobs:
build:
if: (github.repository == 'adamlui/chatgpt-apps') && (github.event.commits[0].committer.username != 'kudo-sync-bot')
runs-on: ubuntu-latest
steps:
- 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 KudoAI/bravegpt
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: KudoAI/bravegpt
path: KudoAI/bravegpt
- 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
for file in "${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/docs/"**/*.md; do
relative_path=${file#"${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/docs/"}
if [ "$(stat -c %y "${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/docs/$relative_path")" > \
"$(stat -c %y "${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/greasemonkey/docs/$relative_path")" ]; then
cp -f \
"${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/docs/$relative_path" \
"${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/greasemonkey/docs/$relative_path"
elif [ "$(stat -c %y "${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/greasemonkey/docs/$relative_path")" > \
"$(stat -c %y "${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/docs/$relative_path")" ]; then
cp -f \
"${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/greasemonkey/docs/$relative_path" \
"${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/docs/$relative_path"
fi
done
- name: Sync bravegpt/ to KudoAI/bravegpt/
run: |
rsync -avhr --delete --filter={'P /.*','P /package*.json'} \
${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/ \
${{ github.workspace }}/KudoAI/bravegpt/
- name: Sync bravegpt/greasemonkey/ to adamlui/userscripts/chatgpt/bravegpt/
run: |
rsync -avhr --delete \
${{ github.workspace }}/adamlui/chatgpt-apps/bravegpt/greasemonkey/ \
${{ github.workspace }}/adamlui/userscripts/chatgpt/bravegpt/
- 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 `adamlui/chatgpt-apps`]'
file_pattern: 'bravegpt/**'
repository: adamlui/chatgpt-apps
- name: Push to KudoAI/bravegpt
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 `adamlui/chatgpt-apps`]'
file_pattern: '**'
repository: KudoAI/bravegpt
- 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 `adamlui/chatgpt-apps`]'
file_pattern: 'chatgpt/bravegpt/**'
repository: adamlui/userscripts