Files
awesome-kubernetes/.github/workflows/03.3.agentic_v2_videos.yml
Inaki Fernandez 5397b7b6aa ci: add [skip ci] to 03.2/03.3 bot commits to stop the develop write-lock burst
The V2 pipeline is meant to advance only via its workflow_run chain
(03.1 -> 03.2 -> 03.3 -> 04.1), which [skip ci] does not affect. But 03.2 and
03.3 committed data/inventory.yaml WITHOUT [skip ci], so their bot pushes also
matched push: path triggers: 03.2 re-triggered itself (and 03.3 triggered it
backward) on data/inventory.yaml, and data/inventory.sql woke 05.1. That
redundant fan-out flooded the shared develop-git-write-lock group; with
cancel-in-progress: false GitHub keeps only one pending run per group, so
superseded runs were auto-cancelled (0 jobs, no logs) - e.g. run 29263339507.

Every other develop-pushing stage (03.1, 04.1, 05.1, 09) already carries
[skip ci]; this completes the pattern on the two stages that were missing it.
The workflow_run chain, schedule, and workflow_dispatch entry points are
unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 19:26:44 +02:00

107 lines
3.3 KiB
YAML

name: 03.3. V2 Video Hub Builder
on:
push:
branches:
- develop
paths:
- 'src/v2_video_portal.py'
- 'src/enrich_videos.py'
workflow_run:
workflows: ["03.2. V2 AI Curator"]
branches: [develop]
types:
- completed
schedule:
- cron: '0 6 1 * *' # Runs on the 1st of every month at 06:00 UTC (every ~30 days)
workflow_dispatch:
inputs:
restore_cache:
description: 'Restore inventory from cache (Warning: May overwrite recent manual changes)'
required: false
type: boolean
default: false
force_enrich:
description: 'Force AI re-enrichment of all videos (ignores cache)'
required: false
type: boolean
default: false
permissions:
contents: write
pull-requests: write
concurrency:
group: develop-git-write-lock
cancel-in-progress: false
jobs:
build-video-hub:
runs-on: ubuntu-latest
if: |
github.event_name != 'workflow_run' ||
github.event.workflow_run.conclusion == 'success'
steps:
- name: Repository Synchronization
uses: actions/checkout@v7
with:
ref: develop
- name: Python 3.11 Environment Provisioning
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'
- name: Restore Incremental Inventory Cache
if: ${{ github.event.inputs.restore_cache == 'true' }}
uses: actions/cache/restore@v6
with:
path: data/inventory.yaml
key: inventory-v2-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
inventory-v2-
- name: Dependency Installation
run: |
python -m pip install --upgrade pip
pip install pyyaml httpx tenacity pytz python-dotenv yt-dlp youtube-transcript-api
- name: Execute Video Hub Enrichment
env:
PYTHONPATH: ${{ github.workspace }}
GEMINI_API_KEY_1: ${{ secrets.GEMINI_API_KEY_1 }}
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
FORCE_ENRICH: ${{ github.event.inputs.force_enrich || 'false' }}
run: |
python src/enrich_videos.py
- name: Execute Video Portal Generator
run: |
export PYTHONPATH=$PYTHONPATH:.
python src/v2_video_portal.py
- name: Commit and Push Video Hub Updates
run: |
git config --global user.name "Nubenetes Bot"
git config --global user.email "bot@nubenetes.com"
git add data/inventory.yaml data/inventory.sql v2-docs/videos/
if git diff --staged --quiet; then
echo "No automated changes to commit."
else
git commit -m "docs: update Video Hub with high-fidelity metadata [skip ci]"
# Retry rebase+push to survive concurrent bot pushes to develop.
for i in {1..5}; do
git pull origin develop --rebase && git push origin develop && exit 0
echo "Push attempt $i/5 rejected — retrying..."; sleep $((i * 3))
done
echo "::error::Video Hub push failed after 5 attempts."; exit 1
fi
- name: Persist Incremental Inventory Cache
if: always()
uses: actions/cache/save@v6
with:
path: data/inventory.yaml
key: inventory-v2-${{ github.run_id }}-${{ github.run_attempt }}