mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-07-24 23:57:00 +00:00
188 lines
6.2 KiB
YAML
188 lines
6.2 KiB
YAML
name: Nubenetes V2 Agentic Builder
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
force_full_check:
|
|
description: 'Force full re-validation (bypasses cache)'
|
|
type: boolean
|
|
default: false
|
|
force_reevaluate:
|
|
description: 'Force AI re-evaluation (ignores cache for tags/years)'
|
|
type: boolean
|
|
default: false
|
|
enrich_metadata:
|
|
description: 'Enrich GitHub Metadata (fetch stars/license for V2 logic)'
|
|
type: boolean
|
|
default: false
|
|
activate_backup_key:
|
|
description: 'Activate Identity B (Subscription) as backup/rotation'
|
|
type: boolean
|
|
default: false
|
|
# Automatic detection: Sync V2 whenever V1 archive or inventory is updated
|
|
push:
|
|
branches: [ develop ]
|
|
paths:
|
|
- 'docs/**'
|
|
- 'data/inventory.yaml'
|
|
- 'src/v2_optimizer.py'
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: v2-builder-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
evaluate-v2-shards:
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
github.event_name == 'workflow_dispatch' ||
|
|
(github.event_name == 'push' &&
|
|
github.ref == 'refs/heads/develop' &&
|
|
!contains(github.event.head_commit.message, '[skip ci]') &&
|
|
!contains(github.event.head_commit.message, 'bot/v2-elite-sync'))
|
|
strategy:
|
|
matrix:
|
|
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]
|
|
max-parallel: 2
|
|
fail-fast: false
|
|
steps:
|
|
- name: Repository Synchronization
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: develop
|
|
fetch-depth: 0
|
|
|
|
- name: Python 3.11 Environment Provisioning
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
|
|
- name: Installation of Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install --no-cache-dir pydantic PyGithub httpx fake-useragent pytz python-dotenv pyyaml tenacity
|
|
|
|
- name: Run V2 Agentic Optimizer (Shard ${{ matrix.shard }})
|
|
env:
|
|
GEMINI_API_KEY_1: ${{ secrets.GEMINI_API_KEY_1 }}
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
ACTIVATE_BACKUP_KEY: 'false'
|
|
FORCE_FULL_CHECK: ${{ github.event.inputs.force_full_check || 'false' }}
|
|
FORCE_EVAL: ${{ github.event.inputs.force_reevaluate || 'false' }}
|
|
ENRICH_METADATA: ${{ github.event.inputs.enrich_metadata || 'false' }}
|
|
PYTHONPATH: .
|
|
run: |
|
|
python -u src/v2_optimizer.py --shard-index ${{ matrix.shard }} --total-shards 64
|
|
|
|
- name: Upload Shard Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: v2-shard-result-${{ matrix.shard }}
|
|
path: v2_shard_result_*.json
|
|
retention-days: 1
|
|
|
|
- name: Upload Shard Inventory DB
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: v2-inventory-shard-${{ matrix.shard }}
|
|
path: data/inventory/shard_*.yaml
|
|
retention-days: 1
|
|
|
|
render-and-pr:
|
|
needs: evaluate-v2-shards
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Repository Synchronization
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: develop
|
|
|
|
- name: Python 3.11 Environment Provisioning
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
|
|
- name: Installation of Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install --no-cache-dir pydantic PyGithub httpx fake-useragent pytz python-dotenv pyyaml tenacity
|
|
|
|
- name: Download all shard artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: shard_artifacts
|
|
pattern: v2-shard-result-*
|
|
merge-multiple: true
|
|
|
|
- name: Download all inventory shards
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: inventory_artifacts
|
|
pattern: v2-inventory-shard-*
|
|
merge-multiple: true
|
|
|
|
- name: Move artifacts to working directories
|
|
run: |
|
|
mv shard_artifacts/*.json . 2>/dev/null || true
|
|
mkdir -p data/inventory
|
|
mv inventory_artifacts/*.yaml data/inventory/ 2>/dev/null || true
|
|
|
|
- name: Render V2 Elite Portal
|
|
env:
|
|
PYTHONPATH: .
|
|
run: |
|
|
python -u src/v2_optimizer.py --render-only
|
|
if [ -f v2_safety_report.md ]; then
|
|
cat v2_safety_report.md >> pr_description.md
|
|
else
|
|
echo "No safety report generated." > pr_description.md
|
|
fi
|
|
|
|
- name: Consolidate README Metrics (Integrated)
|
|
env:
|
|
PYTHONPATH: .
|
|
run: |
|
|
python src/readme_updater.py
|
|
python src/safety_readme.py
|
|
|
|
- name: Create Pull Request for V2 Elite Update
|
|
id: cpr
|
|
uses: peter-evans/create-pull-request@v8
|
|
with:
|
|
branch: bot/v2-elite-sync
|
|
base: develop
|
|
title: "V2 Elite: Agentic Optimization Sync (2026)"
|
|
body-path: pr_description.md
|
|
commit-message: "feat: sync V2 elite curated edition and README metrics [skip ci]"
|
|
labels: "v2-elite, agentic-sync"
|
|
|
|
- name: Post Supplementary Architecture Audit (Comment)
|
|
if: steps.cpr.outputs.pull-request-number != ''
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
|
|
run: |
|
|
if [ -f v2_file_audit.md ]; then
|
|
gh pr comment $PR_NUMBER --body-file v2_file_audit.md
|
|
fi
|
|
|
|
- name: Post Elite Decision Matrix (Comment)
|
|
if: steps.cpr.outputs.pull-request-number != ''
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
|
|
run: |
|
|
if [ -f v2_decision_matrix.md ]; then
|
|
# Split decision matrix if too large for a single comment (approx 60k chars)
|
|
split -b 60000 v2_decision_matrix.md matrix_part_
|
|
for part in matrix_part_*; do
|
|
gh pr comment $PR_NUMBER --body-file $part
|
|
done
|
|
fi
|