-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (47 loc) · 1.58 KB
/
schema.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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@v5
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 }}"