Skip to content

add a ci job to sync readme to huggingface repos (#123) #14

add a ci job to sync readme to huggingface repos (#123)

add a ci job to sync readme to huggingface repos (#123) #14

Workflow file for this run

name: Sync README to Hugging Face Hub
on:
push:
branches:
- main
jobs:
sync-readme:
runs-on: ubuntu-latest
strategy:
matrix:
repo: ['Yi-6B', 'Yi-34B', '01-ai/Yi-34B-200K', '01-ai/Yi-6B-200K']
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Sync README for ${{ matrix.repo }}
run: |
git clone https://huggingface.co/01-ai/${{ matrix.repo }}
cp HUGGINGFACE_README.md ${{ matrix.repo }}/README.md
cd ${{ matrix.repo }}
git config --global user.email "bot@01.ai"
git config --global user.name "01-ai-bot"
# Check for changes
if git diff --quiet; then
echo "No changes to commit for ${{ matrix.repo }}"
else
git add README.md
git commit -m "Sync README"
git push https://shiyue-loop:${{ secrets.HF_TOKEN }}@huggingface.co/01-ai/${{ matrix.repo }}
fi