Skip to content

Schema

Schema #210

Workflow file for this run

name: Schema
on:
schedule:
# avoid delaying or even cancelling job & addressing github advice
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: "19 23 * * *"
workflow_dispatch:
jobs:
manifest:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
local: ${{ steps.manifest.outputs.local }}
remote: ${{ steps.manifest.outputs.remote }}
steps:
- uses: actions/checkout@v4
- name: Load remote & local manifest ids
id: manifest
run: |
echo "remote=$(curl -s https://raw.githubusercontent.com/csfloat/cs-files/master/static/manifestId.txt)" >> $GITHUB_OUTPUT
echo "local=$(cat manifest)" >> $GITHUB_OUTPUT
collect:
needs: manifest
if: needs.manifest.outputs.local != needs.manifest.outputs.remote
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: poetry
- run: poetry install
- name: Collect data and create schemas
run: poetry run python collect.py
- name: Update local manifest id
run: echo "${{ needs.manifest.outputs.remote }}" > manifest
- name: Commit & push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "manifest ${{ needs.manifest.outputs.remote }}"