Files
free-steam-games-list/bash/commit_push.sh
T
poli0981andClaude Opus 5.5 6e7d1bcf15 chore(pipeline): retire Check Dead Links
It sent a HEAD request to every store page every five days, 5.5 hours at
9,847 games, and flagged 404/410. Steam sends a delisted app's page to
the store front, which answers 200: scripts/dead_links.log never existed
and no game ever became "delisted". The purge's GetItems screen sees
delisted games (unlisted) instead.

Removes the workflow, bash/dead_links.sh, scripts/check_dead_links.py
and DEAD_LINKS_LOG, and the workflow from web/shared/pipeline.ts and the
failure notifier's list. check_store_page() stays: it is the health
check's last resort.

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

44 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Commit what a data job changed, and push it even if main moved meanwhile.
#
# A data job can run for an hour or more (refresh-store-data, the
# leaderboards), and `concurrency: data-write` serialises only the WORKFLOWS.
# main still moves underneath one: a merged pull request, an /admin approval,
# removal or override the Worker commits. A plain `git push` is then rejected
# ("fetch first") and the whole run is thrown away - purge-unhealthy lost four
# hours of work that way on 2026-09-21.
#
# None of those other writers touch the shards, so rebasing onto them and
# pushing again is safe. A genuine conflict still fails the job, loudly.
#
# Usage: commit_push.sh "<commit message>" [pathspec ...] (default: .)
set -euo pipefail
msg="$1"
shift
if [[ "$#" -eq 0 ]]; then
set -- .
fi
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add -- "$@"
if git diff --staged --quiet; then
echo "No changes"
exit 0
fi
git commit -m "$msg"
for attempt in 1 2 3 4 5; do
if git push; then
exit 0
fi
echo "Push rejected (attempt $attempt/5): rebasing onto origin/main and retrying"
sleep $((attempt * 10))
git pull --rebase origin main
done
echo "::error::push still rejected after 5 attempts"
exit 1