Download scripts/refresh-30d-sample.workflow.yml from aidancoit9203/cs2-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/datasets/aidancoit9203/cs2-dataset/resolve/main/scripts/refresh-30d-sample.workflow.yml
- Command line
-
hf download hf://datasets/aidancoit9203/cs2-dataset/scripts/refresh-30d-sample.workflow.yml
-
curl -L -o refresh-30d-sample.workflow.yml https://huggingface.co/datasets/aidancoit9203/cs2-dataset/resolve/main/scripts/refresh-30d-sample.workflow.yml
1.04 kB
| name: Refresh Rolling 30-Day CS2 Sample | |
| on: | |
| schedule: | |
| - cron: '0 6 * * 1' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| refresh: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Verify CITO_API_KEY secret | |
| env: | |
| CITO_API_KEY: ${{ secrets.CITO_API_KEY }} | |
| run: | | |
| if [ -z "$CITO_API_KEY" ]; then | |
| echo "CITO_API_KEY secret not set; skipping automated pull." | |
| exit 0 | |
| fi | |
| pip install requests pandas pyarrow | |
| python -c " | |
| import os, requests, pandas as pd | |
| key = os.environ['CITO_API_KEY'] | |
| r = requests.get('https://api.citoapi.com/api/v1/cs2/matches?status=completed&limit=100', headers={'x-api-key': key}, timeout=30) | |
| r.raise_for_status() | |
| print('Fetched latest completed CS2 matches:', len(r.json().get('data', []))) | |
| " | |