Created
September 22, 2022 12:18
-
-
Save 7-TE/dcfd8c45682e6448fd67dec9936f1d20 to your computer and use it in GitHub Desktop.
steam-box.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update steam playtime | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: "10 * * * *" | |
jobs: | |
build: | |
name: Update-steam-playtime | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
GIST_ID: a331df31357400fe7669f96546827f09 | |
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }} | |
STEAM_ID: ${{ secrets.STEAM_ID }} | |
UPDATE_OPTION: GIST_AND_MARKDOWN | |
MARKDOWN_FILE: README.md | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.14 | |
id: go | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
- name: Clone and run steam-box | |
run: |- | |
git clone https://github.com/YouEclipse/steam-box.git | |
cd steam-box && go build -o steam ./cmd/box/main.go | |
mv ./steam ../ && cd .. && rm -rf steam-box/ | |
- name: Commit and push | |
run: |- | |
./steam | |
git config --global user.email "bot@github.com" && git config --global user.name "Steam-Bot" | |
git diff | |
git add README.md && git commit -m ":memo: update profile" || exit 0 | |
git pull && git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment