Files
romm/.github/workflows/update-hltb-api-url.yml
Sam Dornan a34524c7b9 chore(uv): pin the uv version from pyproject and freeze CI syncs
The uv version lived only in the Dockerfile, while CI let setup-uv install
whatever was latest, so the image and CI could build against different
versions. Declaring required-version gives both a single source: setup-uv
resolves from it with no workflow input, and the image build's uv sync
refuses to run when its pinned UV_VERSION falls outside it.

CI also synced without --frozen, so it was free to re-resolve rather than
consume the committed lock the way the image does. A lock the image build
could not use would have passed CI.

The build-time check only runs on a real image build, which is label-gated
rather than part of every CI run, so a test asserts the two agree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HDXxq3vAxJVGhm1pQuK8V7
2026-09-12 00:43:54 +00:00

52 lines
1.5 KiB
YAML

name: Update HowLongToBeat API URL
on:
workflow_dispatch:
schedule:
# HLTB rotates the endpoint without notice, and the fixture is served to
# every install from master, so check weekly rather than on someone noticing.
- cron: "0 6 * * 1"
permissions:
contents: write
pull-requests: write
jobs:
update-hltb-api-url:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
- name: Install python
run: |
uv python install
- name: Install dependencies
run: |
uv sync --frozen
- name: Run HLTB API URL discovery script
# Only satisfies the backend config import; discovery authenticates nothing.
env:
# trunk-ignore(checkov/CKV_SECRET_6): placeholder, not a credential
ROMM_AUTH_SECRET_KEY: unused-by-endpoint-discovery
run: |
cd backend
uv run python -m utils.update_hltb_api_url
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
add-paths: |
backend/handler/metadata/fixtures/hltb_api_url
commit-message: "Update HLTB API URL [skip CI]"
branch: update-hltb-api-url
sign-commits: true
title: "Update HLTB API URL [skip CI]"
reviewers: |
gantoine