Show your most recently played Steam games in a pinned GitHub Gist,
updated automatically. No server required — GitHub Actions does the work.
Your gist will look like this:
🍁 MapleStory
🎮 GrandChase
🚓 Meccha Chameleon
🎮 LOCKDOWN Protocol
🎮 Stardew Valley
Games are sorted by most recently played — no time window, so the last game you launched shows up even if it was months ago. Per-game emojis are configurable in
emoji_map.json; anything unset falls back to 🎮.
Your own server? → none ❌
GitHub Actions (cron) → runs every 30 minutes
└→ calls the Steam Web API → gets your games, sorted by last-played
└→ overwrites your Gist → your pinned profile card stays fresh ✅
It uses the GetOwnedGames endpoint and sorts by each game's rtime_last_played,
so it is not limited to the last two weeks like GetRecentlyPlayedGames.
| Secret | Where to get it |
|---|---|
STEAM_API_KEY |
https://steamcommunity.com/dev/apikey |
STEAM_ID (64-bit) |
https://steamid.io — paste your profile URL |
GH_TOKEN (with gist scope) |
GitHub → Settings → Developer settings → Personal access tokens |
GIST_ID |
Create a public gist at gist.github.com, copy the id from its URL |
⚠️ Set both your Steam profile and game details to Public, otherwise the API returns an empty list.
Go to your repo → Settings → Secrets and variables → Actions → New repository secret
and add all four (STEAM_API_KEY, STEAM_ID, GH_TOKEN, GIST_ID).
🔐 Never hard-code keys or tokens in the source — use Secrets only.
Profile page → Customize your pins → select the gist you created.
Repo Actions tab → steam-recent-games-box → Run workflow. If the log shows
Gist ... updated ✅, you're done. It then refreshes every 30 minutes automatically.
Don't want to wait for the next 30-minute cron tick? Trigger it on demand:
- From GitHub (no local setup needed): Repo → Actions tab → steam-recent-games-box → Run workflow button (top right) → Run workflow. Takes a few seconds; refresh the gist page once the run turns green.
- From your machine: run it directly with the same env vars used in Actions:
pip install -r requirements.txt export STEAM_API_KEY=xxx STEAM_ID=xxx GH_TOKEN=xxx GIST_ID=xxx python steam_box.py
| Want to… | Do this |
|---|---|
| Change number of games | Edit MAX_GAMES in the workflow (default 5) |
| Set a per-game emoji | Add "<appid>": "🚓" to emoji_map.json |
| Change update frequency | Edit the cron in .github/workflows/steam-box.yml |
| Rename the gist file | Set the GIST_FILENAME env var |
- Scheduled workflows only run on the default branch (
main). - Cron timing is best-effort — GitHub may delay runs by a few minutes.
- Scheduled workflows are disabled after 60 days of no repo activity — push a commit now and then to keep it alive.
MIT