Skip to content

Sync Knowledge

Sync Knowledge #13

Workflow file for this run

name: Sync Knowledge
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout target repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
sudo apt-get install -y rsync
pip install yq
- name: Sync repositories
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./.github/sync.sh .github/sync-config.yml
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if [[ -n "$(git status --porcelain)" ]]; then
git add .
git commit -m "sync: update from external repositories"
git push
fi