Skip to content

Update Games

Update Games #549

Workflow file for this run

name: "Update Games"
on:
workflow_dispatch:
schedule:
- cron: "0 0 1-31/2 * *"
jobs:
deps:
name: "Update"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VER }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VER }}
- uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run Script
id: script
shell: bash
continue-on-error: true
env:
NEXUS_KEY: ${{ secrets.NEXUS_KEY }}
run: |
python ./scripts/update_games.py "$NEXUS_KEY"
- name: Commit changes
if: steps.script.outcome == 'failure'
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add ./plugin/games.json
git commit -m "Workflow: Update games listing"
- name: Push changes
if: steps.script.outcome == 'failure'
uses: ad-m/[email protected]
with:
branch: ${{ github.ref }}
github_token: ${{ github.token }}