Changed related section emoji to π€ β [auto-sync from https://github.cβ¦ #88
This file contains hidden or 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 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 |