freshness.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. name: Freshness (live drift checks)
  2. # Live staleness checks for skills that encode fast-moving external facts
  3. # (SKILL-RESOURCE-PROTOCOL.md §7). These hit the network, so they run on a
  4. # schedule — NEVER as a PR gate. A network blip / rate-limit exits 7 and is
  5. # treated as "skip, retry next run"; only a confirmed drift (exit 10) fails
  6. # the job loudly.
  7. on:
  8. schedule:
  9. - cron: "0 6 * * 1" # 06:00 UTC every Monday
  10. workflow_dispatch: {} # manual trigger
  11. permissions:
  12. contents: read
  13. jobs:
  14. drift:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v4
  18. - name: Set up Python
  19. uses: actions/setup-python@v5
  20. with:
  21. python-version: "3.x"
  22. - name: Model table vs live Models API
  23. env:
  24. ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
  25. run: |
  26. set +e
  27. python skills/claude-api-ops/scripts/check-model-table.py --live
  28. rc=$?
  29. # 0 = in sync, 7 = unavailable (no key / unreachable) -> advisory skip,
  30. # 10 = drift -> fail. Anything else is a real error.
  31. if [ "$rc" -eq 10 ]; then echo "::error::model table drifted from the live Models API"; exit 1; fi
  32. if [ "$rc" -eq 7 ]; then echo "::warning::model-table live check unavailable (no key / unreachable) — skipped"; fi
  33. exit 0
  34. - name: ffmpeg-ops docs vs an installed ffmpeg
  35. run: |
  36. set +e
  37. sudo apt-get update -qq && sudo apt-get install -y -qq ffmpeg
  38. bash skills/ffmpeg-ops/scripts/verify-commands.sh --live
  39. rc=$?
  40. if [ "$rc" -eq 10 ]; then echo "::error::ffmpeg-ops docs drifted from current ffmpeg (renamed/removed filter or option)"; exit 1; fi
  41. if [ "$rc" -eq 7 ]; then echo "::warning::ffmpeg unavailable on runner — live check skipped"; fi
  42. exit 0
  43. - name: ytdlp-ops version age + extractor smoke test
  44. env:
  45. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  46. run: |
  47. set +e
  48. # Runner constraint: GH-hosted images lack uv; locally prefer `uv tool install yt-dlp`.
  49. python -m pip install --quiet yt-dlp
  50. bash skills/ytdlp-ops/scripts/check-ytdlp-version.sh --live
  51. rc=$?
  52. if [ "$rc" -eq 10 ]; then echo "::error::ytdlp-ops: yt-dlp >60 days behind latest release or smoke extraction failed (extractor drift)"; exit 1; fi
  53. if [ "$rc" -eq 7 ]; then echo "::warning::ytdlp-ops live check unavailable (network/API/yt-dlp) — skipped"; fi
  54. exit 0
  55. - name: GitHub Action refs still resolve
  56. env:
  57. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  58. run: |
  59. set +e
  60. # Scan every shipped workflow asset + the repo's own workflows.
  61. targets="skills/terraform-ops/assets/github-actions-terraform.yml .github/workflows/*.yml"
  62. bash skills/terraform-ops/scripts/check-action-refs.sh --live $targets
  63. rc=$?
  64. if [ "$rc" -eq 10 ]; then echo "::error::a GitHub Action 'uses:' ref no longer resolves"; exit 1; fi
  65. if [ "$rc" -eq 7 ]; then echo "::warning::action-ref live check rate-limited / unreachable — skipped"; fi
  66. exit 0