Files
free-games-itchio-list/.github/workflows/update.yml
T
poli0981andClaude Opus 5.5 999d0887ee Fix the SonarQube Cloud findings; release 4.4.2 (#155)
The first SonarQube Cloud scan reported 57 issues. 45 are fixed in code, the 11 on the saved itch.io test pages leave the scan via .sonarcloud.properties, and css:S8776 (Tailwind's @utility nesting) is a false positive to mark on SonarQube Cloud.

Worker: trailing slashes and the gate cookie's padding are trimmed by trimEnd() instead of /\/+$/ (quadratic on the public 404 path); the feed and collection parsers lose their backtracking regexes; compareCodeUnits keeps the code-unit sorts (the rule's localeCompare is locale-dependent); Number.*, DEFAULT_SIZES, crypto.randomUUID; i18n-edit.mjs reads stdin. Pipeline: the NSFW notices are one selector list, either class (the rule's ".a.b" would need both), each tested; plain if-guards; update_info.main returns None; no plain-http adapter; [[ ]] in cf_build_status.sh.

Supply chain: requirements*.txt are hash-locked pip-tools compiles of requirements*.in (on Python 3.14, which Dependabot reads from the header), installed with --require-hashes --only-binary :all: in block scalars; npm ci --ignore-scripts in CI and the release builds (verified by manual release runs on all platforms); npm run cf:check.

Release 4.4.2: also ships the toolchain upgrade (#149, #154) and Dependabot #141-#148, #150, #152, #153. CLAUDE.md gotchas 40 and 41.

[skip-discuss]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:16:12 +07:00

80 lines
2.5 KiB
YAML

# Ingest queued links from scripts/temp_link.json (written by the admin
# Worker and its cron) plus an optional dispatched URL.
#
# Runs right away when temp_link.json changes on main (pushes made by GitHub
# Apps trigger it; this workflow's own GITHUB_TOKEN push does not, so no loop),
# and once a day as a safety net. Keep the filename: released apps and
# external tools dispatch `update.yml` by name.
name: Ingest queued games
on:
schedule:
- cron: '23 1 * * *'
push:
branches: [main]
paths:
- 'scripts/temp_link.json'
workflow_dispatch:
inputs:
url:
description: 'itch.io URL to add (optional; if empty, processes scripts/temp_link.json)'
required: false
type: string
permissions: {}
# One ingest at a time, FIFO. `queue: max` matters: with the default queue a
# newer pending run replaces an older pending one, which would silently drop
# that run's dispatched `url` (it is only in the run's input until the run
# writes it to temp_link.json).
concurrency:
group: ingest
cancel-in-progress: false
queue: max
env:
PYTHONUNBUFFERED: '1'
jobs:
ingest:
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # zizmor: ignore[artipacked] — commit_push.sh pushes with this token; no artifacts are uploaded from this job
with:
ref: main
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version-file: .github/python-version
cache: pip
cache-dependency-path: requirements.txt
- name: Install dependencies
run: |
pip install --require-hashes --only-binary :all: -r requirements.txt
- name: Scrape queued links
timeout-minutes: 50
env:
INPUT_URL: ${{ inputs.url }}
run: python scripts/update_info.py --out "$RUNNER_TEMP/patch.json" --deadline-min 45
- name: Apply, validate and push
if: ${{ !cancelled() }}
run: bash bash/commit_push.sh "$RUNNER_TEMP/patch.json" "Ingest queued games [$(date -u +%F)]"
notify:
needs: [ingest]
if: always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled'))
permissions: {}
uses: ./.github/workflows/notify-failure.yml
with:
summary: ingest=${{ needs.ingest.result }}
secrets:
DISCORD_CI_WEBHOOK: ${{ secrets.DISCORD_CI_WEBHOOK }}