Skip to content

Bumped find-project-root to 2.1.0 ↞ [auto-sync from https://github.co… #97

Bumped find-project-root to 2.1.0 ↞ [auto-sync from https://github.co…

Bumped find-project-root to 2.1.0 ↞ [auto-sync from https://github.co… #97

name: Sync ai-personas/ to KudoAI/ai-personas/python/
on:
push:
branches: [main]
paths: [ai-personas/**]
jobs:
build:
if: (github.repository == 'adamlui/python-utils') && !contains(github.event.head_commit.message, '[auto-sync')
runs-on: ubuntu-24.04
permissions:
contents: read
env:
TZ: PST8PDT
steps:
- name: Checkout adamlui/python-utils
uses: actions/checkout@v6.0.2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
path: adamlui/python-utils
- name: Checkout KudoAI/ai-personas
uses: actions/checkout@v6.0.2
with:
token: ${{ secrets.REPO_SYNC_PAT }}
repository: KudoAI/ai-personas
path: KudoAI/ai-personas
- name: Sync ai-personas/ to KudoAI/ai-personas/python/
run: |
rsync -avhc --delete \
${{ github.workspace }}/adamlui/python-utils/ai-personas/ \
${{ github.workspace }}/KudoAI/ai-personas/python/
- name: Escape backticks in commit msg
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
run: |
DELIM="EOF_$(uuidgen)"
echo "ESCAPED_MSG<<$DELIM" >> "$GITHUB_ENV"
echo "$COMMIT_MSG" | sed 's/`/\`/g' >> "$GITHUB_ENV"
echo "$DELIM" >> "$GITHUB_ENV"
- name: Config committer
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PRIVATE_ID: ${{ secrets.GPG_PRIVATE_ID }}
run: |
gpg --batch --import <(echo "$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 "$GPG_PRIVATE_ID"
- name: Push changes to KudoAI/ai-personas
run: |
cd ${{ github.workspace }}/KudoAI/ai-personas
git add . && git commit -n -m \
"$ESCAPED_MSG ↞ [auto-sync from https://github.com/adamlui/python-utils/tree/main/ai-personas]" || true
git pull --rebase
git push