Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 steam-recent-games-box

Show your most recently played Steam games in a pinned GitHub Gist,
updated automatically. No server required — GitHub Actions does the work.


✨ Preview

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 🎮.

⚙️ How it works

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.

🚀 Setup (5 minutes)

1. Get these four things

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.

2. Fork this repo (or "Use this template")

3. Add the secrets

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.

4. Pin the gist to your profile

Profile page → Customize your pins → select the gist you created.

5. Verify

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.

🔄 Manual refresh

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

🛠️ Customization

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

📌 Good to know

  • 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.

📄 License

MIT

About

Pins your most recently played Steam game to a GitHub Gist, auto-updated every 30 min via GitHub Actions. Show your latest Steam game on your GitHub profile — no server, just Actions + Gist.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages