mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-05-21 16:43:36 +00:00
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
name: Nubenetes Backup-based Curation
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
backup_file:
|
|
description: 'Path to the backup file (JSON or MD) inside the repository'
|
|
required: true
|
|
default: 'data/backup_posts.json'
|
|
historical_mode:
|
|
description: 'Activate Historical Mode (Ignores 30-day limit)'
|
|
required: false
|
|
default: 'true'
|
|
type: boolean
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
backup-curation-process:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Repository Synchronization
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Python 3.11 Environment Provisioning
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Installation of Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install --no-cache-dir pydantic PyGithub aiohttp beautifulsoup4 httpx fake-useragent pytz python-dotenv twikit>=2.1.2 playwright playwright-stealth
|
|
# Playwright is required because Gemini evaluator or curator might use it indirectly,
|
|
# even if backup extraction doesn't strictly need it.
|
|
playwright install chromium --with-deps
|
|
|
|
- name: Agentic Curation Execution (Backup Mode)
|
|
env:
|
|
GEMINI_API_KEY_1: ${{ secrets.GEMINI_API_KEY_1 }}
|
|
GEMINI_API_KEY_2: ${{ secrets.GEMINI_API_KEY_2 }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
BACKUP_FILE: ${{ github.event.inputs.backup_file }}
|
|
HISTORICAL_MODE: ${{ github.event.inputs.historical_mode }}
|
|
PYTHONPATH: .
|
|
run: |
|
|
if [ ! -f "$BACKUP_FILE" ]; then
|
|
echo "❌ ERROR: File '$BACKUP_FILE' not found in repository."
|
|
echo "Please upload the file to that path and try again."
|
|
exit 1
|
|
fi
|
|
python src/main.py
|