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 (autoclear-chatgpt-history/ to adamlui/autoclear-chatgpt-history/) && (autoclear-chatgpt-history/greasemonkey/ to adamlui/userscripts/chatgpt/autoclear-chatgpt-history/)
on:
push:
branches: [ master, main ]
paths:
- 'autoclear-chatgpt-history/**'
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 adamlui/autoclear-chatgpt-history
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: adamlui/autoclear-chatgpt-history
path: adamlui/autoclear-chatgpt-history
- 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/autoclear-chatgpt-history/docs/"**/*.md; do
relative_path=${file#"${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/docs/"}
if [ "$(stat -c %y "${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/docs/$relative_path")" > \
"$(stat -c %y "${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/greasemonkey/docs/$relative_path")" ]; then
cp -f \
"${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/docs/$relative_path" \
"${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/greasemonkey/docs/$relative_path"
elif [ "$(stat -c %y "${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/greasemonkey/docs/$relative_path")" > \
"$(stat -c %y "${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/docs/$relative_path")" ]; then
cp -f \
"${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/greasemonkey/docs/$relative_path" \
"${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/docs/$relative_path"
fi
done
- name: Sync autoclear-chatgpt-history/ to adamlui/autoclear-chatgpt-history/
run: |
rsync -avhr --delete --filter={'P /.*','P /package*.json'} \
${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/ \
${{ github.workspace }}/adamlui/autoclear-chatgpt-history/
- name: Sync autoclear-chatgpt-history/greasemonkey/ to adamlui/userscripts/chatgpt/autoclear-chatgpt-history/
run: |
rsync -avhr --delete \
${{ github.workspace }}/adamlui/chatgpt-apps/autoclear-chatgpt-history/greasemonkey/ \
${{ github.workspace }}/adamlui/userscripts/chatgpt/autoclear-chatgpt-history/
- name: Push to adamlui/chatgpt-apps
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
add_options: '--all'
commit_user_email: [email protected]
commit_message: '${{ github.event.head_commit.message }} β†ž [auto-sync from `adamlui/chatgpt-apps`]'
file_pattern: 'autoclear-chatgpt-history/**'
repository: adamlui/chatgpt-apps
- name: Push to adamlui/autoclear-chatgpt-history
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
add_options: '--all'
commit_user_email: [email protected]
commit_message: '${{ github.event.head_commit.message }} β†ž [auto-sync from `adamlui/chatgpt-apps`]'
file_pattern: '**'
repository: adamlui/autoclear-chatgpt-history
- name: Push to adamlui/userscripts
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
add_options: '--all'
commit_user_email: [email protected]
commit_message: '${{ github.event.head_commit.message }} β†ž [auto-sync from `adamlui/chatgpt-apps`]'
file_pattern: 'chatgpt/autoclear-chatgpt-history/**'
repository: adamlui/userscripts