MCP-QA Dataset Sync #69
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: MCP-QA Dataset Sync | |
| on: | |
| schedule: | |
| - cron: '0 */6 * * *' # Every 6 hours | |
| workflow_dispatch: | |
| inputs: | |
| range: | |
| description: 'Excel range to export (e.g., A:C, A1:D100, Sheet1!A:E)' | |
| required: false | |
| type: string | |
| jobs: | |
| pull-latest-google-sheet: | |
| runs-on: ubuntu-latest | |
| env: | |
| DATASET_GOOGLE_SHEET_ID: ${{ secrets.DATASET_GOOGLE_SHEET_ID }} | |
| RANGE: ${{ github.event.inputs.range || 'A:K' }} | |
| EXPORT_FORMAT: 'tsv' | |
| EXPORT_PATH: 'input' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download Google Sheet | |
| run: | | |
| curl -L "https://docs.google.com/spreadsheets/d/${DATASET_GOOGLE_SHEET_ID}/export?format=${EXPORT_FORMAT}&range=${RANGE}" \ | |
| -o ${EXPORT_PATH}/MCP-QA-latest.${EXPORT_FORMAT} | |
| TIMESTAMP=$(date -u +"%Y%m%d-%H%M%S") | |
| curl -L "https://docs.google.com/spreadsheets/d/${DATASET_GOOGLE_SHEET_ID}/export?format=${EXPORT_FORMAT}&range=${RANGE}" \ | |
| -o ${EXPORT_PATH}/MCP-QA-${TIMESTAMP}.${EXPORT_FORMAT} | |
| - name: Commit changes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git diff --quiet && git diff --staged --quiet || \ | |
| (git commit -m "Update MCP-QA from Google Sheet" && git push) |