mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 10:32:57 +01:00
56 lines
1.7 KiB
YAML
56 lines
1.7 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: read
|
|
|
|
jobs:
|
|
update-hltb-api-url:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # For create-pull-request to push the branch
|
|
pull-requests: write # For create-pull-request to open the PR
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.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
|