跳到正文
DEV Community· Yury Atrashkevich·· 2 小時前AI 評分59

Yury Atrashkevich 製作 GitHub Action,提前追蹤供應商停用與價格變更

I made a GitHub Action that opens an issue before a vendor breaks your build

AI 導讀

Yury Atrashkevich 製作的 GitHub Action 每週掃描程式碼,找出有期限的供應商停用或價格變更,並建立列明檔案及行號、日期、剩餘日數和修復方法的 issue。

正文

Yury Atrashkevich

Every few weeks some vendor retires something my code depends on. A runner label, a Lambda runtime, an OpenAI model, a GKE version. The notice exists - in a changelog, a deprecation table, an email to a billing inbox. We still find out when the build fails.

Dependabot tells you when a library is old. Nothing told me "this line in this repo stops working on Nov 2". So I made a small GitHub Action for that.

What it does

Once a week it reads your repo on the GitHub runner and looks for things that have a dated shutdown or price change. If it finds any, it opens one issue with the file and line, the date, days left and the fix. When you fix everything, the issue closes itself.

This is from the demo repo (full issue here):

Found 9 places hit by 9 vendor deadlines within 120 days.

  • [ ] GKE 1.31 extended support ends October 22, 2026 - 3 days left
    • infra/gke.tf:4 min_master_version = "1.31"
    • Fix: Upgrade the control plane, then each node pool, to 1.32 or newer before GKE does it for you.
  • [ ] OpenAI shuts down gpt-4, gpt-3.5-turbo, o1 and o4-mini on October 23 - 4 days left
    • src/ai/summarize.py:7 "gpt-4"
    • Fix: Change the model name: most go to gpt-5.6-sol or gpt-5.6-terra.
  • [ ] AWS Lambda Python 3.10 runtime deprecated October 31, 2026 - 12 days left
    • serverless.yml:4 runtime: python3.10
  • [ ] GitHub Actions macos-14 runners retire November 2, 2026 - 14 days left
    • .github/workflows/ci.yml:11 macos-14

Setup

One file, .github/workflows/deadline-check.yml:

name: Vendor deadline check
on:
  schedule:
    - cron: '17 6 * * 1'   # Mondays
  workflow_dispatch:
permissions:
  contents: read
  issues: write
jobs:
  deadlines:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: timetobail/deadline-check@v0

That's it. Options: days (default 120), fail-on-days if you want the job to fail when something is close, comment-on-pr.

What it knows about

114 rules for 94 dated changes, for example:

  • AI models: OpenAI (gpt-4, GPT-4o and 4.1 snapshots, TTS, Whisper), Gemini API and Vertex AI, Azure OpenAI, Amazon Bedrock, Claude
  • CI: GitHub Actions runners (macos-14, ubuntu-22.04), Azure Pipelines images, GitLab 20.0 removals, CircleCI images and APIs
  • Runtimes: AWS Lambda, Cloud Run functions, App Engine, Azure Functions, Heroku stacks
  • Kubernetes: GKE, EKS and AKS versions
  • Other: .NET 8/9, Prisma Accelerate, Bitbucket SSH host, Docker Content Trust

Every rule points to a dated change that comes from the vendor's own page (deprecation tables, changelogs, docs). No rumors, no "or later" dates.

Things I cared about

  • Your code never leaves the runner. The action makes one GET request for the public rules list. That's the only network call.
  • Strict rules. A false alarm is worse than a miss. "gpt-4" matches, "gpt-4o" doesn't. dotnet matches, dotnet-isolated doesn't. Comment lines are skipped.
  • One issue, not a flood. It updates the same issue every week.
  • Free. The action is MIT, the rules are open data (CC BY 4.0).

Links

If it misses something in your stack, or flags something it shouldn't, open an issue with a small sample - I'll add or fix the rule. And I'm curious: which deprecation surprised you the most this year?

Disclosure: I run timetobail.com, where the rules and the change pages live.

來源:DEV Community · dev.to