Skip to content

Dataset

Dataset #917

Workflow file for this run

name: Dataset
on:
push:
branches:
- master
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
update_dataset:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install huggingface-cli
run: |
python -m pip install --upgrade pip
pip install huggingface_hub
- name: Login to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
hf auth login --token "$HF_TOKEN" --add-to-git-credential
- name: Make script executable
run: chmod +x ./*
- name: Run update_dataset.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./update_dataset.sh
- name: Configure git
run: |
git config user.name "eastspire"
git config user.email "root@ltpp.vip"
- name: Commit and push changes
run: |
set -e
if git status --porcelain | grep .; then
git add .
git commit -m "chore: update dataset"
git push origin HEAD:master
echo "✅ Changes pushed to GitHub"
else
echo "ℹ️ No changes to commit"
fi