Awesome
<p align="center"> <img width="400" src="https://user-images.githubusercontent.com/8252317/83985151-9e8eaf00-a96a-11ea-9b3c-b654dc9bee2f.png"> <h3 align="center">steam-box</h3> <p align="center"><img width="20" height="20" src="https://store.steampowered.com/favicon.ico"></img> Update pinned gist / profile README to contain your Steam playtime leaderboard. </p> <p align="center"> <a href="https://github.com/YouEclipse/steam-box/workflows/Update%20gist%20with%20Steam%20Playtime/badge.svg"><img src="https://github.com/YouEclipse/steam-box/workflows/Update%20gist%20with%20Steam%20Playtime/badge.svg" alt="Update gist with Steam Playtime"></a> </p> </p>English | ็ฎไฝไธญๆ
๐โจ For more pinned-gist projects like this one, check out: https://github.com/matchai/awesome-pinned-gists
๐ป Setup
๐ Prep work
if only want's to update a markdown,like profile README,skip step 1 and step 2.
- Create a new public GitHub Gist (https://gist.github.com/)
- Create a token with the
gist
scope and copy it. (https://github.com/settings/tokens/new) - Create a Steam API key. (https://steamcommunity.com/dev/apikey)
- Find the steam ID (steamID64) of your account. (https://steamid.io)
- For updating a markdown file๏ผadd comments to the place where you want to update in the markdown file.
<!-- steam-box start --> <!-- steam-box end -->
๐ Project setup
- Fork this repo
- Edit the environment variable in
.github/workflows/schedule.yml
:
For updating github profile README,you can follow steam-box.yml in YouEclipse to create a Action in your README repo.Remember it's unsafe to use token with
repo
scope for updating the repo, steam-box update the profile repo using git command in Github Action instead of using github API.
- GIST_ID: The ID portion from your gist url:
https://gist.github.com/YouEclipse/
9bc7025496e478f439b9cd43eba989a4
.
- Go to the repo Settings > Secrets
- Add the following environment variables:
- GH_TOKEN: The GitHub token generated above.
- STEAM_API_KEY: The steam API key you created above.
- STEAM_ID: The steam ID of your account.
- If you want to show specific games,put the ids in environmet variable APP_ID:
- like
APP_ID=431960,730
- you can get the id of a game from the store url:
https://store.steampowered.com/app/
730/CounterStrike_Global_Offensive/
- like
๐ต๏ธ How it works
- Get your games playtime from Steamwork Web API
- Update Gist with Github API
- Use Github Actions for updating Gist
๐ License
This project is licensed under Apache-2.0