Files
romm/.github/workflows/update-hltb-api-url.yml

57 lines
1.8 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
timeout-minutes: 15
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: Set up the backend
uses: ./.github/actions/setup-backend
- 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
report-failure:
needs: [update-hltb-api-url]
if: failure() && github.event_name == 'schedule'
permissions:
contents: read
issues: write
uses: ./.github/workflows/report-scheduled-failure.yml