Update #19377
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 | |
on: | |
schedule: | |
- cron: '*/60 * * * *' | |
#push: | |
# branches: | |
# - main | |
jobs: | |
sync: | |
name: Download saves | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install requirements | |
run: | | |
#pip3 install "git+https://github.com/ValvePython/steam#egg=steam[client]" | |
pip3 install steampy | |
pip3 install bs4 | |
pip3 install html5lib | |
- name: Download saves | |
run: | | |
export TZ='Asia/Shanghai' | |
#python3 -m steam.versions_report | |
python3 runner.py -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }} -s ${{ secrets.SHAREDSECRET }} -a ${{ secrets.APIKEY }} -i ${{ secrets.STEAMID }} | |
- name: Run safe dir | |
run: | | |
git config --global --add safe.directory /github/workspace | |
- name: Check file change | |
id: check | |
run: | | |
git diff --quiet . || echo "OUTPUT=true" >> $GITHUB_OUTPUT | |
- name: Push files | |
if: steps.check.outputs.OUTPUT == 'true' | |
run: | | |
git config user.name left916 | |
git config user.email [email protected] | |
git fetch --unshallow origin | |
git add . | |
git commit -m "update" | |
git push |